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',
48 qapi_storage_daemon_modules = [
62 qapi_nonmodule_outputs = [
63 'qapi-introspect.c', 'qapi-introspect.h',
64 'qapi-types.c', 'qapi-types.h',
65 'qapi-visit.h', 'qapi-visit.c',
66 'qapi-commands.h', 'qapi-commands.c',
67 'qapi-init-commands.h', 'qapi-init-commands.c',
68 'qapi-events.h', 'qapi-events.c',
69 'qapi-emit-events.c', 'qapi-emit-events.h',
72 # First build all sources
74 'qapi-builtin-types.c', 'qapi-builtin-visit.c',
75 'qapi-builtin-types.h', 'qapi-builtin-visit.h',
79 qapi_specific_outputs = []
80 foreach module : qapi_all_modules
81 qapi_inputs += [ files(module + '.json') ]
82 qapi_module_outputs = [
83 'qapi-types-@0@.c'.format(module),
84 'qapi-types-@0@.h'.format(module),
85 'qapi-visit-@0@.c'.format(module),
86 'qapi-visit-@0@.h'.format(module),
87 'qapi-events-@0@.c'.format(module),
88 'qapi-events-@0@.h'.format(module),
89 'qapi-commands-@0@.c'.format(module),
90 'qapi-commands-@0@.h'.format(module),
92 if module.endswith('-target')
93 qapi_specific_outputs += qapi_module_outputs
95 qapi_util_outputs += qapi_module_outputs
99 qapi_files = custom_target('shared QAPI source files',
100 output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs + ['qapi-doc.texi'],
101 input: [ files('qapi-schema.json') ],
102 command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
103 depend_files: [ qapi_inputs, qapi_gen_depends ])
105 # Now go through all the outputs and add them to the right sourceset.
106 # These loops must be synchronized with the output of the above custom target.
109 foreach output : qapi_util_outputs
110 if output.endswith('.h')
111 genh += qapi_files[i]
113 util_ss.add(qapi_files[i])
117 foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
118 if output.endswith('.h')
119 genh += qapi_files[i]
121 specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
125 qapi_doc_texi = qapi_files[i]