[tlbuild] Build script "improvements"

Olaf Weber olaf at infovore.xs4all.nl
Tue May 20 19:48:44 CEST 2008


A peculiarity of the IRIX build is that I have to do some fixups after
the configure run and before I can do the actual compilation.  Having
a build script that re-runs the (very slow) configure scripts on a 2nd
rebuilding makes this needlessly difficult (and forces me to touch
source files instead of generated files).

So I "improved" the build script by adding two more options:

  --no-configure: don't run the configure scripts
  --no-make:      don't run make

Required order (if given) is:

  ./Build --no-clean --no-configure --no-make

Is this considered worth checking in?


Index: Build
===================================================================
--- Build	(revision 8164)
+++ Build	(working copy)
@@ -35,6 +35,20 @@
   rm -rf $TL_WORKDIR $TL_INSTALL_DEST
 fi
 
+if test "x$1" = x--no-configure; then
+  TL_NO_CONFIGURE=1
+  shift
+else
+  TL_NO_CONFIGURE=0
+fi
+
+if test "x$1" = x--no-make; then
+  TL_NO_MAKE=1
+  shift
+else
+  TL_NO_MAKE=0
+fi
+
 : ${TL_BUILD_ENV=}
 if test "x$1" = x--debug; then
   TL_BUILD_ENV="CFLAGS=-g CXXFLAGS=-g"
@@ -71,19 +85,26 @@
 # set -vx
 
 # configure && make.  Keep the tee outside, so that we can detect
-# failure at either step.
+# failure at either step.  Rather than try to get an extistatus
+# via a pipeline, we just use a temp file.
 {
-  eval $TL_BUILD_ENV time $TL_CONFIGURE \
+  if test "$TL_NO_CONFIGURE" = 0; then
+    eval $TL_BUILD_ENV time $TL_CONFIGURE \
         --prefix=$TL_INSTALL_DEST \
         --datadir=$TL_INSTALL_DEST \
         $TL_CONF_XDVI_TOOLKIT \
         $TL_CONF_XINDY \
         $TL_CONFIGURE_ARGS \
-        "$@" \
-  && eval $TL_BUILD_ENV time $TL_MAKE $TL_TARGET
+        "$@"
+    echo $? >exitstatus.txt
+  else
+    echo 0 >exitstatus.txt
+  fi
+
+  if test `cat exitstatus.txt` = 0 && test "$TL_NO_MAKE" = 0; then
+    eval $TL_BUILD_ENV time $TL_MAKE $TL_TARGET
+  fi
   
-  # Too arcane to try to propagate the exit status through a pipeline.
-  # Just use a temp file.
   echo $? >exitstatus.txt
 } 2>&1 | tee build.log
  


-- 
Olaf Weber

               (This space left blank for technical reasons.)



More information about the tlbuild mailing list