[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 35/39] configure: Add missing quoting for some easy cases
From: |
Peter Maydell |
Subject: |
[PULL 35/39] configure: Add missing quoting for some easy cases |
Date: |
Thu, 22 Sep 2022 17:35:32 +0100 |
This commit adds quotes in some places which:
* are spotted by shellcheck
* are obviously incorrect
* are easy to fix just by adding the quotes
It doesn't attempt fix all of the places shellcheck finds errors,
or even all the ones which are easy to fix. It's just a random
sampling which is hopefully easy to review and which cuts
down the size of the problem for next time somebody wants to
try to look at shellcheck errors.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20220825150703.4074125-4-peter.maydell@linaro.org
---
configure | 64 +++++++++++++++++++++++++++----------------------------
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/configure b/configure
index e42d43d6a50..86cc6259181 100755
--- a/configure
+++ b/configure
@@ -57,7 +57,7 @@ GNUmakefile: ;
EOF
cd build
- exec $source_path/configure "$@"
+ exec "$source_path/configure" "$@"
fi
# Temporary directory used for files created while
@@ -691,7 +691,7 @@ meson_option_build_array() {
printf ']\n'
}
-. $source_path/scripts/meson-buildoptions.sh
+. "$source_path/scripts/meson-buildoptions.sh"
meson_options=
meson_option_add() {
@@ -711,7 +711,7 @@ for opt do
case "$opt" in
--help|-h) show_help=yes
;;
- --version|-V) exec cat $source_path/VERSION
+ --version|-V) exec cat "$source_path/VERSION"
;;
--prefix=*) prefix="$optarg"
;;
@@ -985,7 +985,7 @@ default_target_list=""
mak_wilds=""
if [ "$linux_user" != no ]; then
- if [ "$targetos" = linux ] && [ -d
$source_path/linux-user/include/host/$cpu ]; then
+ if [ "$targetos" = linux ] && [ -d
"$source_path/linux-user/include/host/$cpu" ]; then
linux_user=yes
elif [ "$linux_user" = yes ]; then
error_exit "linux-user not supported on this architecture"
@@ -995,7 +995,7 @@ if [ "$bsd_user" != no ]; then
if [ "$bsd_user" = "" ]; then
test $targetos = freebsd && bsd_user=yes
fi
- if [ "$bsd_user" = yes ] && ! [ -d $source_path/bsd-user/$targetos ]; then
+ if [ "$bsd_user" = yes ] && ! [ -d "$source_path/bsd-user/$targetos" ];
then
error_exit "bsd-user not supported on this host OS"
fi
fi
@@ -1117,7 +1117,7 @@ python="$python -B"
if test -z "$meson"; then
if test "$explicit_python" = no && has meson && version_ge "$(meson
--version)" 0.59.3; then
meson=meson
- elif test $git_submodules_action != 'ignore' ; then
+ elif test "$git_submodules_action" != 'ignore' ; then
meson=git
elif test -e "${source_path}/meson/meson.py" ; then
meson=internal
@@ -1834,7 +1834,7 @@ esac
container="no"
if test $use_containers = "yes"; then
if has "docker" || has "podman"; then
- container=$($python $source_path/tests/docker/docker.py probe)
+ container=$($python "$source_path"/tests/docker/docker.py probe)
fi
fi
@@ -2284,7 +2284,7 @@ if test "$QEMU_GA_DISTRO" = ""; then
QEMU_GA_DISTRO=Linux
fi
if test "$QEMU_GA_VERSION" = ""; then
- QEMU_GA_VERSION=$(cat $source_path/VERSION)
+ QEMU_GA_VERSION=$(cat "$source_path"/VERSION)
fi
@@ -2533,7 +2533,7 @@ fi
for target in $target_list; do
target_dir="$target"
target_name=$(echo $target | cut -d '-' -f 1)$EXESUF
- mkdir -p $target_dir
+ mkdir -p "$target_dir"
case $target in
*-user) symlink "../qemu-$target_name" "$target_dir/qemu-$target_name"
;;
*) symlink "../qemu-system-$target_name"
"$target_dir/qemu-system-$target_name" ;;
@@ -2568,14 +2568,14 @@ for target in $target_list; do
config_target_mak=tests/tcg/config-$target.mak
echo "# Automatically generated by configure - do not modify" >
$config_target_mak
- echo "TARGET_NAME=$arch" >> $config_target_mak
+ echo "TARGET_NAME=$arch" >> "$config_target_mak"
case $target in
xtensa*-linux-user)
# the toolchain is not complete with headers, only build softmmu tests
continue
;;
*-softmmu)
- test -f $source_path/tests/tcg/$arch/Makefile.softmmu-target || continue
+ test -f "$source_path/tests/tcg/$arch/Makefile.softmmu-target" ||
continue
qemu="qemu-system-$arch"
;;
*-linux-user|*-bsd-user)
@@ -2590,73 +2590,73 @@ for target in $target_list; do
# compilers is a requirememt for adding a new test that needs a
# compiler feature.
- echo "BUILD_STATIC=$build_static" >> $config_target_mak
- write_target_makefile >> $config_target_mak
+ echo "BUILD_STATIC=$build_static" >> "$config_target_mak"
+ write_target_makefile >> "$config_target_mak"
case $target in
aarch64-*)
if do_compiler "$target_cc" $target_cflags \
-march=armv8.1-a+sve -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_SVE=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-march=armv8.1-a+sve2 -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_SVE2=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_SVE2=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-march=armv8.3-a -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_ARMV8_3=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-mbranch-protection=standard -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_ARMV8_BTI=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-march=armv8.5-a+memtag -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_ARMV8_MTE=y" >> "$config_target_mak"
fi
;;
ppc*)
if do_compiler "$target_cc" $target_cflags \
-mpower8-vector -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> "$config_target_mak"
fi
if do_compiler "$target_cc" $target_cflags \
-mpower10 -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_POWER10=y" >> "$config_target_mak"
fi
;;
i386-linux-user)
if do_compiler "$target_cc" $target_cflags \
-Werror -fno-pie -o $TMPE $TMPC; then
- echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_I386_NOPIE=y" >> "$config_target_mak"
fi
;;
esac
elif test -n "$container_image"; then
echo "build-tcg-tests-$target: docker-image-$container_image" >>
$makefile
- echo "BUILD_STATIC=y" >> $config_target_mak
- write_container_target_makefile >> $config_target_mak
+ echo "BUILD_STATIC=y" >> "$config_target_mak"
+ write_container_target_makefile >> "$config_target_mak"
case $target in
aarch64-*)
- echo "CROSS_CC_HAS_SVE=y" >> $config_target_mak
- echo "CROSS_CC_HAS_SVE2=y" >> $config_target_mak
- echo "CROSS_CC_HAS_ARMV8_3=y" >> $config_target_mak
- echo "CROSS_CC_HAS_ARMV8_BTI=y" >> $config_target_mak
- echo "CROSS_CC_HAS_ARMV8_MTE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_SVE=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_SVE2=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_ARMV8_3=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_ARMV8_BTI=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_ARMV8_MTE=y" >> "$config_target_mak"
;;
ppc*)
- echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> $config_target_mak
- echo "CROSS_CC_HAS_POWER10=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_POWER8_VECTOR=y" >> "$config_target_mak"
+ echo "CROSS_CC_HAS_POWER10=y" >> "$config_target_mak"
;;
i386-linux-user)
- echo "CROSS_CC_HAS_I386_NOPIE=y" >> $config_target_mak
+ echo "CROSS_CC_HAS_I386_NOPIE=y" >> "$config_target_mak"
;;
esac
got_cross_cc=yes
fi
if test $got_cross_cc = yes; then
mkdir -p tests/tcg/$target
- echo "QEMU=$PWD/$qemu" >> $config_target_mak
+ echo "QEMU=$PWD/$qemu" >> "$config_target_mak"
echo "run-tcg-tests-$target: $qemu\$(EXESUF)" >> $makefile
tcg_tests_targets="$tcg_tests_targets $target"
fi
--
2.25.1
- [PULL 23/39] chardev/baum: Use definitions to avoid dynamic stack allocation, (continued)
- [PULL 23/39] chardev/baum: Use definitions to avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 28/39] hw/intc/xics: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 18/39] target/arm: Add secure parameter to get_phys_addr_pmsav7, Peter Maydell, 2022/09/22
- [PULL 30/39] hw/usb/hcd-ohci: Use definition to avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 25/39] io/channel-websock: Replace strlen(const_str) by sizeof(const_str) - 1, Peter Maydell, 2022/09/22
- [PULL 24/39] chardev/baum: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 26/39] hw/net/e1000e_core: Use definition to avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 29/39] hw/i386/multiboot: Avoid dynamic stack allocation, Peter Maydell, 2022/09/22
- [PULL 20/39] hw/acpi: Add ospm_status hook implementation for acpi-ged, Peter Maydell, 2022/09/22
- [PULL 37/39] configure: Remove use of backtick `...` syntax, Peter Maydell, 2022/09/22
- [PULL 35/39] configure: Add missing quoting for some easy cases,
Peter Maydell <=
- [PULL 36/39] configure: Add './' on front of glob of */config-devices.mak.d, Peter Maydell, 2022/09/22
- Re: [PULL 00/39] target-arm queue, Stefan Hajnoczi, 2022/09/26