summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-03-24 17:34:45 +0000
committerKarl Berry <karl@freefriends.org>2008-03-24 17:34:45 +0000
commit752c8e823229993f33d7fa68ea39b963c6611214 (patch)
tree5984c5988025031b602e19a21eed9149c761ca96 /Build
parent0b5550c241229764120d133af80a0cbab5937ddd (diff)
exit with appropriate status
git-svn-id: svn://tug.org/texlive/trunk@7125 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/Build27
1 files changed, 17 insertions, 10 deletions
diff --git a/Build/source/Build b/Build/source/Build
index 3bc07a7b58b..f870471d90a 100755
--- a/Build/source/Build
+++ b/Build/source/Build
@@ -65,23 +65,30 @@ export GNUMAKE
# build, so omit the warning about it.
: ${KPATHSEA_WARNING=0}
-# configure && make.
-(set -x; \
- eval $TL_BUILD_ENV time $TL_CONFIGURE \
- --prefix=$TL_INSTALL_DEST \
- --datadir=$TL_INSTALL_DEST \
- $TL_XDVI_TOOLKIT \
- $TL_CONFIGURE_ARGS \
- "$@" 2>&1 | tee configure.log\
- && eval $TL_BUILD_ENV time $TL_MAKE $TL_TARGET 2>&1 | tee make.log)
+# configure && make. Keep the tee outside, so that we can detect
+# failure at either step.
+{
+ set -x; \
+ eval $TL_BUILD_ENV time $TL_CONFIGURE \
+ --prefix=$TL_INSTALL_DEST \
+ --datadir=$TL_INSTALL_DEST \
+ $TL_XDVI_TOOLKIT \
+ $TL_CONFIGURE_ARGS \
+ "$@" \
+ && eval $TL_BUILD_ENV time $TL_MAKE $TL_TARGET
+ exitstatus=$?
+} 2>&1 | tee build.log
+
# report the number of binaries built.
bindir=$TL_INSTALL_DEST/bin
count=`ls $bindir/*/* | wc -l`
if test "$count" -gt 0; then
- echo "$0: $count binaries under $bindir."
+ echo
+ echo "$0: $count binaries in $bindir."
else
echo "$0: Build failed, no binaries under $bindir."
exit 1
fi
+exit $exitstatus