]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 5013: Fix scripts for environments where "set -ux" carries over
authorMasamichi Hosoda <trueroad@trueroad.jp>
Fri, 16 Dec 2016 11:57:58 +0000 (20:57 +0900)
committerMasamichi Hosoda <trueroad@trueroad.jp>
Thu, 22 Dec 2016 11:55:20 +0000 (20:55 +0900)
Normally, in Bourne shell scripts,
"set -ux" does not carry over to child processes.
However, under some conditions, it carries over to child processes.
(E.g. environment variable SHELLOPTS exists.)

If "set -ux" in smart-autogen.sh carries over to the child processes,
autoconf fails.

In order to avoid the issue,
this commit makes smart-autogen.sh and smart-configure.sh use
"set +ux" to cancel the effect of "set -ux"
just before invoking the child process.

Likewise, this commit also removes "set -e"
for avoiding "set -e" carrying over, and adds alternative error handling.

smart-autogen.sh
smart-configure.sh

index 6f4525dac19da80fea2617d4872e640ee2c9953b..77412123cc4936a69deaef737eb9d4d2612aa49a 100755 (executable)
@@ -11,6 +11,5 @@ if test `cat $CHECKSUM_FILE`"" = "$AUTOGEN_INPUT_CHECKSUM"; then
   exit 0
 fi
 
-set -e
-${srcdir}/autogen.sh "$@"
+( set +ux; echo Invoking autogen.sh...; ${srcdir}/autogen.sh "$@" ) || exit 1
 printf "%s" $AUTOGEN_INPUT_CHECKSUM > $CHECKSUM_FILE
index d55947f08c2f07756d1494beeaea7fc513c64a6e..8ba39eb7dc9237939fa74d1210971bb51419f960 100755 (executable)
@@ -14,7 +14,6 @@ if test `cat $CONFIGURE_CHECKSUM_FILE` = "$CONFIGURE_CHECKSUM" ; then
   exit 0
 fi
 
-set -e
-$srcdir/configure "$@"
+( set +ux; echo Invoking configure...; $srcdir/configure "$@" ) || exit 1
 printf "%s" $CONFIGURE_CHECKSUM > $CONFIGURE_CHECKSUM_FILE