 43d7e1d782
			
		
	
	
		43d7e1d782
		
	
	
	
	
		
			
			This patch adds replay.json file. It will be used for adding record/replay-related data structures and commands. Signed-off-by: Pavel Dovgalyuk <pavel.dovgalyuk@ispras.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <160174519444.12451.3472949430004845434.stgit@pasha-ThinkPad-X280> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
		
			
				
	
	
		
			129 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			Meson
		
	
	
	
	
	
			
		
		
	
	
			129 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			Meson
		
	
	
	
	
	
| util_ss.add(files(
 | |
|   'opts-visitor.c',
 | |
|   'qapi-clone-visitor.c',
 | |
|   'qapi-dealloc-visitor.c',
 | |
|   'qapi-util.c',
 | |
|   'qapi-visit-core.c',
 | |
|   'qmp-dispatch.c',
 | |
|   'qmp-event.c',
 | |
|   'qmp-registry.c',
 | |
|   'qobject-input-visitor.c',
 | |
|   'qobject-output-visitor.c',
 | |
|   'string-input-visitor.c',
 | |
|   'string-output-visitor.c',
 | |
| ))
 | |
| 
 | |
| qapi_all_modules = [
 | |
|   'acpi',
 | |
|   'audio',
 | |
|   'authz',
 | |
|   'block',
 | |
|   'block-core',
 | |
|   'block-export',
 | |
|   'char',
 | |
|   'common',
 | |
|   'control',
 | |
|   'crypto',
 | |
|   'dump',
 | |
|   'error',
 | |
|   'introspect',
 | |
|   'job',
 | |
|   'machine',
 | |
|   'machine-target',
 | |
|   'migration',
 | |
|   'misc',
 | |
|   'misc-target',
 | |
|   'net',
 | |
|   'pragma',
 | |
|   'qdev',
 | |
|   'pci',
 | |
|   'qom',
 | |
|   'rdma',
 | |
|   'replay',
 | |
|   'rocker',
 | |
|   'run-state',
 | |
|   'sockets',
 | |
|   'tpm',
 | |
|   'trace',
 | |
|   'transaction',
 | |
|   'ui',
 | |
| ]
 | |
| 
 | |
| qapi_storage_daemon_modules = [
 | |
|   'block-core',
 | |
|   'block-export',
 | |
|   'char',
 | |
|   'common',
 | |
|   'control',
 | |
|   'crypto',
 | |
|   'introspect',
 | |
|   'job',
 | |
|   'qom',
 | |
|   'sockets',
 | |
|   'pragma',
 | |
|   'transaction',
 | |
| ]
 | |
| 
 | |
| qapi_nonmodule_outputs = [
 | |
|   'qapi-introspect.c', 'qapi-introspect.h',
 | |
|   'qapi-types.c', 'qapi-types.h',
 | |
|   'qapi-visit.h', 'qapi-visit.c',
 | |
|   'qapi-commands.h', 'qapi-commands.c',
 | |
|   'qapi-init-commands.h', 'qapi-init-commands.c',
 | |
|   'qapi-events.h', 'qapi-events.c',
 | |
|   'qapi-emit-events.c', 'qapi-emit-events.h',
 | |
| ]
 | |
| 
 | |
| # First build all sources
 | |
| qapi_util_outputs = [
 | |
|   'qapi-builtin-types.c', 'qapi-builtin-visit.c',
 | |
|   'qapi-builtin-types.h', 'qapi-builtin-visit.h',
 | |
| ]
 | |
| 
 | |
| qapi_inputs = []
 | |
| qapi_specific_outputs = []
 | |
| foreach module : qapi_all_modules
 | |
|   qapi_inputs += [ files(module + '.json') ]
 | |
|   qapi_module_outputs = [
 | |
|     'qapi-types-@0@.c'.format(module),
 | |
|     'qapi-types-@0@.h'.format(module),
 | |
|     'qapi-visit-@0@.c'.format(module),
 | |
|     'qapi-visit-@0@.h'.format(module),
 | |
|     'qapi-events-@0@.c'.format(module),
 | |
|     'qapi-events-@0@.h'.format(module),
 | |
|     'qapi-commands-@0@.c'.format(module),
 | |
|     'qapi-commands-@0@.h'.format(module),
 | |
|   ]
 | |
|   if module.endswith('-target')
 | |
|     qapi_specific_outputs += qapi_module_outputs
 | |
|   else
 | |
|     qapi_util_outputs += qapi_module_outputs
 | |
|   endif
 | |
| endforeach
 | |
| 
 | |
| qapi_files = custom_target('shared QAPI source files',
 | |
|   output: qapi_util_outputs + qapi_specific_outputs + qapi_nonmodule_outputs,
 | |
|   input: [ files('qapi-schema.json') ],
 | |
|   command: [ qapi_gen, '-o', 'qapi', '-b', '@INPUT0@' ],
 | |
|   depend_files: [ qapi_inputs, qapi_gen_depends ])
 | |
| 
 | |
| # Now go through all the outputs and add them to the right sourceset.
 | |
| # These loops must be synchronized with the output of the above custom target.
 | |
| 
 | |
| i = 0
 | |
| foreach output : qapi_util_outputs
 | |
|   if output.endswith('.h')
 | |
|     genh += qapi_files[i]
 | |
|   endif
 | |
|   util_ss.add(qapi_files[i])
 | |
|   i = i + 1
 | |
| endforeach
 | |
| 
 | |
| foreach output : qapi_specific_outputs + qapi_nonmodule_outputs
 | |
|   if output.endswith('.h')
 | |
|     genh += qapi_files[i]
 | |
|   endif
 | |
|   specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: qapi_files[i])
 | |
|   i = i + 1
 | |
| endforeach
 |