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.
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
exit 0
fi
-set -e
-$srcdir/configure "$@"
+( set +ux; echo Invoking configure...; $srcdir/configure "$@" ) || exit 1
printf "%s" $CONFIGURE_CHECKSUM > $CONFIGURE_CHECKSUM_FILE