summaryrefslogtreecommitdiffstats
path: root/build_all.sh
diff options
context:
space:
mode:
authorCarsten Schlote <c.schlote@konzeptpark.de>2007-08-31 10:08:31 +0000
committerCarsten Schlote <c.schlote@konzeptpark.de>2007-08-31 10:08:31 +0000
commit4cf594300691d00a9727fdb4620cbe36ecd53448 (patch)
treedf41d2fc55452decce9c504f5f2fbc52e3f9f231 /build_all.sh
parentd5fa8cbd70258a2ee8b23d00bf0834026b561cf6 (diff)
downloadOSELAS.Toolchain-4cf594300691d00a9727fdb4620cbe36ecd53448.tar.gz
OSELAS.Toolchain-4cf594300691d00a9727fdb4620cbe36ecd53448.tar.xz
* Added code to create install directories at once
* More cleanups and options added to build_all.sh git-svn-id: https://svn.pengutronix.de/svn/oselas/toolchain/trunks/OSELAS.Toolchain-trunk@3751 f8d472c7-5700-0410-ac5a-87979cec3adf
Diffstat (limited to 'build_all.sh')
-rwxr-xr-xbuild_all.sh37
1 files changed, 33 insertions, 4 deletions
diff --git a/build_all.sh b/build_all.sh
index e8459a8..00957a1 100755
--- a/build_all.sh
+++ b/build_all.sh
@@ -5,18 +5,47 @@
# Add some similiar line to your crontab (e.g. crontab -e)
# 0,5,10,15,20,25,30,35,40,45,50,55 * * * * [ -f /home/csc/src/OSELAS.Toolchain-trunk/build_all.sh ] && \
# ( cd /home/csc/src/OSELAS.Toolchain-trunk/ && ISCRON=yes bash build_all.sh )
+#
+# Modify sudoers file to allow mkdir and chown to be called without password,
+# unattented builds are possible for new configs
buildlogfile=build_all_logs/build_all.log-`date +%y%m%d-%H%M`
lockfile=build_all.lock
set -e
+# -- Get options ---------------------------------------------------------------
+
+while getopts ":Bb:CIRh" Option
+do
+ case $Option in
+ B ) makeoptions=-B ;;
+ b ) maketargets=build_$OPTARG ;;
+ I ) maketargets=mkinstdirs ;;
+ R ) maketargets=rminstdirs ;;
+ C ) make -f build_all.mk distclean; exit 0; ;;
+ h )
+ echo " -B Unconditionally build all";
+ echo " -b config Build single config (without ptxconfig suffix)";
+ echo " -I Create all install dirs at once";
+ echo " -R Clean all install dirs at once";
+ echo " -C Distclean autoclean system";
+ ;;
+ esac
+done
+shift $(($OPTIND - 1))
+
+#echo $makeoptions $maketargets
+#exit 0
+
if [ -z "${ISCRON}" ]; then set -x;
else
# If ISCRON is not zero, setup some paths for ptxdist and other tools
export PATH=/usr/bin:/usr/sbin/:/usr/local/bin:/usr/local/sbin:$PATH
fi
+# -- Get lockfile and process builds -------------------------------------------
+
if ( set -o noclobber; echo "$$" > "$lockfile") 2> /dev/null;
then
trap 'rm -f "$lockfile"; exit $?' INT TERM EXIT
@@ -31,9 +60,9 @@ then
# -- The make process is started with via 'nice' to avoid high cpu-load on compile host
mkdir -p build_all_logs
if [ -n "${ISCRON}" ]; then
- nice -n 5 make -f build_all.mk > $buildlogfile
+ nice -n 5 make -f build_all.mk $makeoptions $maketargets > $buildlogfile
else
- nice -n 5 make -f build_all.mk
+ nice -n 5 make -f build_all.mk $makeoptions $maketargets
fi
# -- Delete empty logfiles
@@ -54,13 +83,13 @@ fi
# -- ToDo ---------------------------------------------------------------------
# T=testing, X=done
#
-# [ ] Fix creation of new install dirs - create a script to setup them all at once
+# [T] Fix creation of new install dirs - create a script to setup them all at once
# (sudo hack for mkdir and NOPASSWD: ?)
# [ ] 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 -
# apply fixup-ptxconfigs.sh?
-# [ ] Add code to create all install directory at once - so you have to enter the
+# [T] Add code to create all install directory at once - so you have to enter the
# 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...