]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 1453] Use $CC in config.cache filename in ./build script.
authorDave Hart <hart@ntp.org>
Wed, 6 Jan 2010 18:52:49 +0000 (18:52 +0000)
committerDave Hart <hart@ntp.org>
Wed, 6 Jan 2010 18:52:49 +0000 (18:52 +0000)
bk: 4b44dc01j-ge0gjDXFtA1WkzanA6eg

ChangeLog
build

index a7f7d354ce7fe5cc2abbe5375d52267248631132..523fcbb3cb6f7079428cb9a8fbcb23b8dbda90e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,10 @@
 ---
 
-* [Bug 1445] IRIX does not have -lcap or support linux capabilities.
-* [Bug 1440] Update configure.ac to support kfreebsd.
-* [Bug 1439] .texi generation must wait until after binary is linked.
 * [Bug 1127] Properly check the return of X590_verify() - missed one.
+* [Bug 1439] .texi generation must wait until after binary is linked.
+* [Bug 1440] Update configure.ac to support kfreebsd.
+* [Bug 1445] IRIX does not have -lcap or support linux capabilities.
+* [Bug 1453] Use $CC in config.cache filename in ./build script.
 
 ---
 (4.2.6p1-RC2) 2009/12/25 Released by Harlan Stenn <stenn@ntp.org>
diff --git a/build b/build
index c4cc3b86f231e991a3a846ee90b4cba1e8ef3fcf..33eb451e4fcda141b598cd69b7b229e1a74374e4 100755 (executable)
--- a/build
+++ b/build
@@ -84,11 +84,12 @@ case "$CONFIG_ARGS" in
     ;;
 esac
 
-CCSUF=""
-
 case "$CC" in
- '') ;;
- *) CCSUF="-`echo $CC | sed -e 's: :_:g' -e's:/:+:g'`"
+ '')
+    CCSUF=""
+    ;;
+ *)
+    CCSUF="-`echo $CC | sed -e 's: :_:g' -e's:/:+:g'`"
     ;;
 esac
 
@@ -103,38 +104,36 @@ cd $BDIR
 
 #
 # Make sure we have a nice that works.
-# To disable use of nice make a dummy nice script such
-# as the heredoc a few lines below and set BNICE to its
-# path.
-# 
+# To disable use of nice, setenv NO_NICE_BUILD=1
 #
-nice true && NICEB=nice
-nice true || {
-       NICEB=./.nicebuild-$MYNAME-$SIG
-       cat > .nicebuild-$MYNAME-$SIG <<-HEREDOC
+NICEB=""
+[ "$NO_NICE_BUILD" != "1" ] && nice true && NICEB=nice
+[ -z "$NICEB" ] && {
+       NICEB="./.nicebuild-$MYNAME-$SIG"
+       cat > $NICEB <<-HEREDOC
                #! /bin/sh
                shift
                \$*
 HEREDOC
-       chmod +x .nicebuild-$MYNAME-$SIG
+       chmod +x $NICEB
 }
 
+CONFIGURE="../configure --cache-file=../config.cache-$IAM$CCSUF $CONFIG_ARGS"
 
-(
-[ -f config.status ] || $NICEB -7 ../configure \
-                       --cache-file=../config.cache-$IAM \
-                       $CONFIG_ARGS
-
-$NICEB -5 ./config.status
-
-case "$MAKE" in
- '') $NICEB -14 make && $NICEB -10 make check
-     ;;
- *)  $NICEB -14 $MAKE && $NICEB -10 $MAKE check
-     ;;
-esac
+(      # This sequence of commands is logged to make.log.
+       [ -f config.status ] || $NICEB -7 $CONFIGURE
+       $NICEB -5 ./config.status
+       $NICEB -14 ${MAKE-make} && $NICEB -10 ${MAKE-make} check
 ) > $LOGF 2>&1
 
+EXITCODE=$?
 
 # clean up if we made a dummy nice script
-[ -f .nicebuild-$MYNAME-$SIG ] && rm .nicebuild-$MYNAME-$SIG
+case "$NICEB" in
+ nice)
+    ;;
+ *)
+    rm $NICEB
+esac
+
+exit $EXITCODE