3 'qapi-clone-visitor.c',
4 'qapi-dealloc-visitor.c',
10 'qobject-input-visitor.c',
11 'qobject-output-visitor.c',
12 'string-input-visitor.c',
13 'string-output-visitor.c',
52 qapi_storage_daemon_modules = [
67 qapi_nonmodule_outputs = [
68 'qapi-introspect.c', 'qapi-introspect.h',
69 'qapi-types.c', 'qapi-types.h',
70 'qapi-visit.h', 'qapi-visit.c',
71 'qapi-commands.h', 'qapi-commands.c',
72 'qapi-init-commands.h', 'qapi-init-commands.c',
73 'qapi-events.h', 'qapi-events.c',
74 'qapi-emit-events.c', 'qapi-emit-events.h',
77 # First build all sources
79 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
80 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
84 qapi_specific_outputs = []
85 foreach module : qapi_all_modules
86 qapi_inputs += [ files(module + '.json') ]
87 qapi_module_outputs = [
88 'qapi-types-@0@.c'.format(module),
89 'qapi-types-@0@.h'.format(module),
90 'qapi-visit-@0@.c'.format(module),
91 'qapi-visit-@0@.h'.format(module),
92 'qapi-events-@0@.c'.format(module),
93 'qapi-events-@0@.h'.format(module),
94 'qapi-commands-@0@.c'.format(module),
95 'qapi-commands-@0@.h'.format(module),
97 if module.endswith('-target')
98 qapi_specific_outputs += qapi_module_outputs
100 qapi_util_outputs += qapi_module_outputs
104 qapi_files = custom_target('shared QAPI source files',
105 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
106 input: [ files('qapi-schema.json') ],
107 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
108 depend_files: [ qapi_inputs, qapi_gen_depends ])
110 # Now go through all the outputs and add them to the right sourceset.
111 # These loops must be synchronized with the output of the above custom target.
114 foreach output : qapi_util_outputs
115 if output.endswith('.h')
116 genh += qapi_files[i]
118 util_ss.add(qapi_files[i])
122 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
123 if output.endswith('.h')
124 genh += qapi_files[i]
126 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])