summaryrefslogtreecommitdiffstats
path: root/build_all.sh
diff options
context:
space:
mode:
authorCarsten Schlote <c.schlote@konzeptpark.de>2007-08-30 11:24:04 +0000
committerCarsten Schlote <c.schlote@konzeptpark.de>2007-08-30 11:24:04 +0000
commitc388467cd89ceb7a39dffc800070639cae9a42f2 (patch)
treecdf6b5023e5d6f17362e54333147692709006034 /build_all.sh
parentd944bee40b9298e9f2fc6e1c72df3858aec54d15 (diff)
downloadOSELAS.Toolchain-c388467cd89ceb7a39dffc800070639cae9a42f2.tar.gz
OSELAS.Toolchain-c388467cd89ceb7a39dffc800070639cae9a42f2.tar.xz
* Updated build_all scripts
git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@3723 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'build_all.sh')
-rwxr-xr-xbuild_all.sh46
1 files changed, 33 insertions, 13 deletions
diff --git a/build_all.sh b/build_all.sh
index 4c1af99..46abcc7 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -1,23 +1,41 @@
-#! /bin/bash
+#!/bin/bash
# This is some wrapper to call the makefile fragment, which builds all toolchains
# - might be a good place for common preparations and final postprocessing
-# -- Update current SVN workcopy
-svn update
+BUILDLOG=build_all_logs/build_all.log-`date +%y%m%d-%H%M`
+#set -x
+if test -z ${ISCRON}; then set -x; fi
-# -- Start make, which check dependencies on the ptxconfig files stored in gstate
-# -- For each updated ptxconfig the toolchain is recompiled
-# -- Finaly a status file suitable for parsing is generated and stored in
-# -- gstate/OSELAS-BuildAll-Status.txt
-# -- The make process is started with via nice to avoid cpu-load on compile host
-nice -n 5 make -f build_all.mk
+if test ! -e build_all.lock; then
+ touch build_all.lock
+
+ # -- Update current SVN workcopy
+ svn update
-# -- Dump status file
-echo -n "\n\n"
-cat gstate/OSELAS-BuildAll-Status.txt
+ # -- Start make, which check dependencies on the ptxconfig files stored in gstate
+ # -- For each updated ptxconfig the toolchain is recompiled
+ # -- Finaly a status file suitable for parsing is generated and stored in
+ # -- gstate/OSELAS-BuildAll-Status.txt
+ # -- The make process is started with via nice to avoid cpu-load on compile host
+ mkdir -p build_all_logs
+ if test ${ISCRON}; then
+ nice -n 5 make -f build_all.mk > $BUILDLOG
+ else
+ nice -n 5 make -f build_all.mk
+ fi
+ if test -z "`cat $BUILDLOG`"; then rm $BUILDLOG; fi
-# -- ToDos:
+ # -- Dump status file info
+ echo -e "\n\nStatus stored in gstate/OSELAS-BuildAll-Status.txt"
+ rm -f build_all.lock
+
+else
+ #Don't output things - causes mail flooding with cron
+ #echo "Build script still active ? (Remove lock build_all.lock otherwise)"
+ make -f build_all.mk updatestatpage
+fi
+# -- ToDo ---------------------------------------------------------------------
# [ ] Checkout a new working copy of trunk for each chain, and do building in parallel
# [ ] Create a nice HTML output for the status showing the actual status of each chain
# [ ] Add checks to ensure consitency of ptxconfig files and install locations -
@@ -26,4 +44,6 @@ cat gstate/OSELAS-BuildAll-Status.txt
# sudo password only once, when this script started the first time.
# [ ] Remove link to installation directory from cross-toolchain.make?
# We need some way to determine the installation path from outside ptxdist...
+# [x] Add lock file for cron triggered operation
+