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
60 if have_system or have_tools
66 qapi_storage_daemon_modules = [
81 qapi_nonmodule_outputs = [
82 'qapi-introspect.c', 'qapi-introspect.h',
83 'qapi-types.c', 'qapi-types.h',
84 'qapi-visit.h', 'qapi-visit.c',
85 'qapi-commands.h', 'qapi-commands.c',
86 'qapi-init-commands.h', 'qapi-init-commands.c',
87 'qapi-events.h', 'qapi-events.c',
88 'qapi-emit-events.c', 'qapi-emit-events.h',
91 # First build all sources
93 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
94 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
98 qapi_specific_outputs = []
99 foreach module : qapi_all_modules
100 qapi_inputs += [ files(module + '.json') ]
101 qapi_module_outputs = [
102 'qapi-types-@0@.c'.format(module),
103 'qapi-types-@0@.h'.format(module),
104 'qapi-visit-@0@.c'.format(module),
105 'qapi-visit-@0@.h'.format(module),
107 if have_system or have_tools
108 qapi_module_outputs += [
109 'qapi-events-@0@.c'.format(module),
110 'qapi-events-@0@.h'.format(module),
111 'qapi-commands-@0@.c'.format(module),
112 'qapi-commands-@0@.h'.format(module),
115 if module.endswith('-target')
116 qapi_specific_outputs += qapi_module_outputs
118 qapi_util_outputs += qapi_module_outputs
122 qapi_files = custom_target('shared QAPI source files',
123 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
124 input: [ files('qapi-schema.json') ],
125 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
126 depend_files: [ qapi_inputs, qapi_gen_depends ])
128 # Now go through all the outputs and add them to the right sourceset.
129 # These loops must be synchronized with the output of the above custom target.
132 foreach output : qapi_util_outputs
133 if output.endswith('.h')
134 genh += qapi_files[i]
136 util_ss.add(qapi_files[i])
140 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
141 if output.endswith('.h')
142 genh += qapi_files[i]
144 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])