Statistics
| Branch: | Revision:

root / qemu-options-wrapper.h @ feature-archipelago

History | View | Annotate | Download (1 kB)

1 77bd1119 Michael Ellerman
2 77bd1119 Michael Ellerman
#if defined(QEMU_OPTIONS_GENERATE_ENUM)
3 77bd1119 Michael Ellerman
4 77bd1119 Michael Ellerman
#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)     \
5 77bd1119 Michael Ellerman
    opt_enum,
6 77bd1119 Michael Ellerman
#define DEFHEADING(text)
7 a3adb7ad Michael Ellerman
#define ARCHHEADING(text, arch_mask)
8 77bd1119 Michael Ellerman
9 77bd1119 Michael Ellerman
#elif defined(QEMU_OPTIONS_GENERATE_HELP)
10 77bd1119 Michael Ellerman
11 a3adb7ad Michael Ellerman
#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)    \
12 a3adb7ad Michael Ellerman
    if ((arch_mask) & arch_type)                               \
13 a3adb7ad Michael Ellerman
        fputs(opt_help, stdout);
14 a3adb7ad Michael Ellerman
15 a3adb7ad Michael Ellerman
#define ARCHHEADING(text, arch_mask) \
16 a3adb7ad Michael Ellerman
    if ((arch_mask) & arch_type)    \
17 a3adb7ad Michael Ellerman
        puts(stringify(text));
18 a3adb7ad Michael Ellerman
19 a3adb7ad Michael Ellerman
#define DEFHEADING(text) ARCHHEADING(text, QEMU_ARCH_ALL)
20 77bd1119 Michael Ellerman
21 77bd1119 Michael Ellerman
#elif defined(QEMU_OPTIONS_GENERATE_OPTIONS)
22 77bd1119 Michael Ellerman
23 77bd1119 Michael Ellerman
#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask)     \
24 77bd1119 Michael Ellerman
    { option, opt_arg, opt_enum, arch_mask },
25 77bd1119 Michael Ellerman
#define DEFHEADING(text)
26 a3adb7ad Michael Ellerman
#define ARCHHEADING(text, arch_mask)
27 77bd1119 Michael Ellerman
28 77bd1119 Michael Ellerman
#else
29 77bd1119 Michael Ellerman
#error "qemu-options-wrapper.h included with no option defined"
30 77bd1119 Michael Ellerman
#endif
31 77bd1119 Michael Ellerman
32 77bd1119 Michael Ellerman
#include "qemu-options.def"
33 77bd1119 Michael Ellerman
34 77bd1119 Michael Ellerman
#undef DEF
35 77bd1119 Michael Ellerman
#undef DEFHEADING
36 a3adb7ad Michael Ellerman
#undef ARCHHEADING
37 77bd1119 Michael Ellerman
#undef GEN_DOCS
38 77bd1119 Michael Ellerman
39 77bd1119 Michael Ellerman
#undef QEMU_OPTIONS_GENERATE_ENUM
40 77bd1119 Michael Ellerman
#undef QEMU_OPTIONS_GENERATE_HELP
41 77bd1119 Michael Ellerman
#undef QEMU_OPTIONS_GENERATE_OPTIONS