configure, meson: move config-poison.h to meson
This ensures that the file is regenerated properly whenever config-target.h or config-devices.h files change. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b962a1d507
commit
eed56e9a89
2
Makefile
2
Makefile
@ -221,7 +221,7 @@ qemu-%.tar.bz2:
|
|||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || :
|
-$(quiet-@)test -f build.ninja && $(NINJA) $(NINJAFLAGS) -t clean -g || :
|
||||||
rm -f config-host.mak config-poison.h
|
rm -f config-host.mak
|
||||||
rm -f tests/tcg/config-*.mak
|
rm -f tests/tcg/config-*.mak
|
||||||
rm -f config.status
|
rm -f config.status
|
||||||
rm -f roms/seabios/config.mak
|
rm -f roms/seabios/config.mak
|
||||||
|
11
configure
vendored
11
configure
vendored
@ -3834,17 +3834,6 @@ if test -n "${deprecated_features}"; then
|
|||||||
echo " features: ${deprecated_features}"
|
echo " features: ${deprecated_features}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create list of config switches that should be poisoned in common code...
|
|
||||||
# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
|
|
||||||
target_configs_h=$(ls *-config-devices.h *-config-target.h 2>/dev/null)
|
|
||||||
if test -n "$target_configs_h" ; then
|
|
||||||
sed -n -e '/CONFIG_TCG/d' -e '/CONFIG_USER_ONLY/d' \
|
|
||||||
-e '/^#define / { s///; s/ .*//; s/^/#pragma GCC poison /p; }' \
|
|
||||||
$target_configs_h | sort -u > config-poison.h
|
|
||||||
else
|
|
||||||
:> config-poison.h
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Save the configure command line for later reuse.
|
# Save the configure command line for later reuse.
|
||||||
cat <<EOD >config.status
|
cat <<EOD >config.status
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
12
meson.build
12
meson.build
@ -2028,6 +2028,18 @@ config_all += {
|
|||||||
'CONFIG_ALL': true,
|
'CONFIG_ALL': true,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
target_configs_h = []
|
||||||
|
foreach target: target_dirs
|
||||||
|
target_configs_h += config_target_h[target]
|
||||||
|
target_configs_h += config_devices_h.get(target, [])
|
||||||
|
endforeach
|
||||||
|
genh += custom_target('config-poison.h',
|
||||||
|
input: [target_configs_h],
|
||||||
|
output: 'config-poison.h',
|
||||||
|
capture: true,
|
||||||
|
command: [find_program('scripts/make-config-poison.sh'),
|
||||||
|
target_configs_h])
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# Submodules #
|
# Submodules #
|
||||||
##############
|
##############
|
||||||
|
16
scripts/make-config-poison.sh
Executable file
16
scripts/make-config-poison.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
if test $# = 0; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create list of config switches that should be poisoned in common code...
|
||||||
|
# but filter out CONFIG_TCG and CONFIG_USER_ONLY which are special.
|
||||||
|
exec sed -n \
|
||||||
|
-e' /CONFIG_TCG/d' \
|
||||||
|
-e '/CONFIG_USER_ONLY/d' \
|
||||||
|
-e '/^#define / {' \
|
||||||
|
-e 's///' \
|
||||||
|
-e 's/ .*//' \
|
||||||
|
-e 's/^/#pragma GCC poison /p' \
|
||||||
|
-e '}' "$@"
|
Loading…
x
Reference in New Issue
Block a user