3 'qapi-clone-visitor.c',
4 'qapi-dealloc-visitor.c',
7 'qobject-input-visitor.c',
8 'qobject-output-visitor.c',
9 'string-input-visitor.c',
10 'string-output-visitor.c',
12 if have_system or have_tools
59 if have_system or have_tools
65 qapi_storage_daemon_modules = [
80 qapi_nonmodule_outputs = [
81 'qapi-introspect.c', 'qapi-introspect.h',
82 'qapi-types.c', 'qapi-types.h',
83 'qapi-visit.h', 'qapi-visit.c',
84 'qapi-commands.h', 'qapi-commands.c',
85 'qapi-init-commands.h', 'qapi-init-commands.c',
86 'qapi-events.h', 'qapi-events.c',
87 'qapi-emit-events.c', 'qapi-emit-events.h',
90 # First build all sources
92 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
93 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
97 qapi_specific_outputs = []
98 foreach module : qapi_all_modules
99 qapi_inputs += [ files(module + '.json') ]
100 qapi_module_outputs = [
101 'qapi-types-@0@.c'.format(module),
102 'qapi-types-@0@.h'.format(module),
103 'qapi-visit-@0@.c'.format(module),
104 'qapi-visit-@0@.h'.format(module),
106 if have_system or have_tools
107 qapi_module_outputs += [
108 'qapi-events-@0@.c'.format(module),
109 'qapi-events-@0@.h'.format(module),
110 'qapi-commands-@0@.c'.format(module),
111 'qapi-commands-@0@.h'.format(module),
114 if module.endswith('-target')
115 qapi_specific_outputs += qapi_module_outputs
117 qapi_util_outputs += qapi_module_outputs
121 qapi_files = custom_target('shared QAPI source files',
122 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
123 input: [ files('qapi-schema.json') ],
124 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
125 depend_files: [ qapi_inputs, qapi_gen_depends ])
127 # Now go through all the outputs and add them to the right sourceset.
128 # These loops must be synchronized with the output of the above custom target.
131 foreach output : qapi_util_outputs
132 if output.endswith('.h')
133 genh += qapi_files[i]
135 util_ss.add(qapi_files[i])
139 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
140 if output.endswith('.h')
141 genh += qapi_files[i]
143 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])