diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-24 00:03:54 +0100 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2021-12-24 03:46:36 +0100 |
commit | e07c8e6e617f0e30a2de134e53509a31b7b07bf3 (patch) | |
tree | 02cb4c0584631d5845324c6b3701292bac3b4b05 | |
parent | ecc50f56b3282ec3b0364101d860f22fe8da9042 (diff) |
Fix some forwarded cross-build options with spaces
I forgot about the problem of quoting variables with command
options having arguments containg spaces to pass to a subcommand
in shell scripts. AFAIK there is no way to handle this correctly.
A possible workaround might be to create a temporary shell script
with the correct quoting. But I'm just aware of the $with_theme
and $with_parallelism variables to eventually contain spaces, so
just handle them separately.
Regression from commit c0c937d1ff2a47c55b597e10c0f0055e5bfda7e0
("Echo cross-toolset configure options").
Change-Id: I56f777bdc24210726997afcd9d22ddfe3580f4e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127390
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r-- | configure.ac | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 2d50a9907469..72f212aee4f9 100644 --- a/configure.ac +++ b/configure.ac @@ -5513,6 +5513,7 @@ if test "$cross_compiling" = "yes"; then test "${with_system_lockfile+set}" = set && sub_conf_opts="$sub_conf_opts --with-system-lockfile=${with_system_lockfile}" # Don't bother having configure look for stuff not needed for the build platform anyway + # WARNING: any option with an argument containing spaces must be handled separately (see --with-theme) sub_conf_defaults=" \ --build="$build_alias" \ --disable-cairo-canvas \ @@ -5536,13 +5537,21 @@ if test "$cross_compiling" = "yes"; then --without-doxygen \ --without-webdav \ --without-x \ - --with-parallelism="$with_parallelism" \ - --with-theme="$with_theme" \ --with-tls=openssl \ " - echo " Running CONF-FOR-BUILD/configure" $sub_conf_defaults $sub_conf_opts $with_build_platform_configure_options --srcdir=$srcdir + # single quotes added for better readability in case of spaces + echo " Running CONF-FOR-BUILD/configure" \ + $sub_conf_defaults \ + --with-parallelism="'$with_parallelism'" \ + --with-theme="'$with_theme'" \ + $sub_conf_opts \ + $with_build_platform_configure_options \ + --srcdir=$srcdir + ./configure \ $sub_conf_defaults \ + --with-parallelism="$with_parallelism" \ + --with-theme="$with_theme" \ $sub_conf_opts \ $with_build_platform_configure_options \ --srcdir=$srcdir \ |