3 'qapi-clone-visitor.c',
4 'qapi-dealloc-visitor.c',
5 'qapi-forward-visitor.c',
8 'qobject-input-visitor.c',
9 'qobject-output-visitor.c',
10 'string-input-visitor.c',
11 'string-output-visitor.c',
14 util_ss.add(files('qapi-type-helpers.c'))
16 if have_system or have_tools
64 if have_system or have_tools
70 qapi_storage_daemon_modules = [
85 qapi_nonmodule_outputs = [
86 'qapi-introspect.c', 'qapi-introspect.h',
87 'qapi-types.c', 'qapi-types.h',
88 'qapi-visit.h', 'qapi-visit.c',
89 'qapi-commands.h', 'qapi-commands.c',
90 'qapi-init-commands.h', 'qapi-init-commands.c',
91 'qapi-events.h', 'qapi-events.c',
92 'qapi-emit-events.c', 'qapi-emit-events.h',
95 # First build all sources
97 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
98 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
102 qapi_specific_outputs = []
103 foreach module : qapi_all_modules
104 qapi_inputs += [ files(module + '.json') ]
105 qapi_module_outputs = [
106 'qapi-types-@0@.c'.format(module),
107 'qapi-types-@0@.h'.format(module),
108 'qapi-visit-@0@.c'.format(module),
109 'qapi-visit-@0@.h'.format(module),
111 if have_system or have_tools
112 qapi_module_outputs += [
113 'qapi-events-@0@.c'.format(module),
114 'qapi-events-@0@.h'.format(module),
115 'qapi-commands-@0@.c'.format(module),
116 'qapi-commands-@0@.h'.format(module),
117 'qapi-commands-@0@.trace-events'.format(module),
120 if module.endswith('-target')
121 qapi_specific_outputs += qapi_module_outputs
123 qapi_util_outputs += qapi_module_outputs
127 qapi_files = custom_target('shared QAPI source files',
128 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
129 input: [ files('qapi-schema.json') ],
130 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
131 depend_files: [ qapi_inputs, qapi_gen_depends ])
133 # Now go through all the outputs and add them to the right sourceset.
134 # These loops must be synchronized with the output of the above custom target.
137 foreach output : qapi_util_outputs
138 if output.endswith('.h')
139 genh += qapi_files[i]
141 if output.endswith('.trace-events')
142 qapi_trace_events += qapi_files[i]
144 util_ss.add(qapi_files[i])
148 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
149 if output.endswith('.h')
150 genh += qapi_files[i]
152 if output.endswith('.trace-events')
153 qapi_trace_events += qapi_files[i]
155 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])