Skip to content

Commit

Permalink
meson: identify more sections of meson.build
Browse files Browse the repository at this point in the history
Add more headers that clarify code organization.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
bonzini committed Oct 12, 2020
1 parent 8cfe801 commit a0c9162
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,9 @@ if not has_malloc_trim and get_option('malloc_trim').enabled()
endif
endif

# Create config-host.h
#################
# config-host.h #
#################

config_host_data.set('CONFIG_COCOA', cocoa.found())
config_host_data.set('CONFIG_LIBUDEV', libudev.found())
Expand Down Expand Up @@ -660,6 +662,10 @@ foreach k, v: config_host
endif
endforeach

########################
# Target configuration #
########################

minikconf = find_program('scripts/minikconf.py')
config_all = {}
config_all_devices = {}
Expand Down Expand Up @@ -866,7 +872,9 @@ config_all += {
'CONFIG_ALL': true,
}

# Submodules
##############
# Submodules #
##############

capstone = not_found
capstone_opt = get_option('capstone')
Expand Down Expand Up @@ -1105,9 +1113,11 @@ config_host_data.set('CONFIG_CAPSTONE', capstone.found())
config_host_data.set('CONFIG_FDT', fdt.found())
config_host_data.set('CONFIG_SLIRP', slirp.found())

genh += configure_file(output: 'config-host.h', configuration: config_host_data)
#####################
# Generated sources #
#####################

# Generators
genh += configure_file(output: 'config-host.h', configuration: config_host_data)

hxtool = find_program('scripts/hxtool')
shaderinclude = find_program('scripts/shaderinclude.pl')
Expand Down Expand Up @@ -1182,7 +1192,9 @@ sphinx_extn_depends = [ meson.source_root() / 'docs/sphinx/depfile.py',
meson.source_root() / 'docs/sphinx/qmp_lexer.py',
qapi_gen_depends ]

# Collect sourcesets.
###################
# Collect sources #
###################

authz_ss = ss.source_set()
blockdev_ss = ss.source_set()
Expand Down Expand Up @@ -1320,8 +1332,6 @@ if enable_modules
modulecommon = declare_dependency(link_whole: libmodulecommon, compile_args: '-DBUILD_DSO')
endif

# Build targets from sourcesets

stub_ss = stub_ss.apply(config_all, strict: false)

util_ss.add_all(trace_ss)
Expand Down Expand Up @@ -1409,6 +1419,10 @@ specific_ss.add_all(when: 'CONFIG_LINUX_USER', if_true: linux_user_ss)
subdir('tests/qtest/libqos')
subdir('tests/qtest/fuzz')

########################
# Library dependencies #
########################

block_mods = []
softmmu_mods = []
foreach d, list : modules
Expand Down Expand Up @@ -1443,10 +1457,6 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms',
capture: true,
command: [undefsym, nm, '@INPUT@'])

########################
# Library dependencies #
########################

qom_ss = qom_ss.apply(config_host, strict: false)
libqom = static_library('qom', qom_ss.sources() + genh,
dependencies: [qom_ss.dependencies()],
Expand Down Expand Up @@ -1797,6 +1807,10 @@ if host_machine.system() == 'windows'
alias_target('installer', nsis)
endif

#########################
# Configuration summary #
#########################

summary_info = {}
summary_info += {'Install prefix': config_host['prefix']}
summary_info += {'BIOS directory': config_host['qemu_datadir']}
Expand Down

0 comments on commit a0c9162

Please sign in to comment.