summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-04-18 10:53:18 -0700
committerH. Peter Anvin <hpa@zytor.com>2017-04-18 10:53:18 -0700
commit2efb04c8f97d587775f24bb1ae1ffe27c70bce36 (patch)
treef8dad02f7d541a2d142d324bf415e32bd78dea30
parente787154cb4561e031cd948b08671fb0e9c18cc82 (diff)
downloadnasmbuild-2efb04c8f97d587775f24bb1ae1ffe27c70bce36.tar.gz
nasmbuild-2efb04c8f97d587775f24bb1ae1ffe27c70bce36.tar.xz
nasmbuild-2efb04c8f97d587775f24bb1ae1ffe27c70bce36.zip
buildall.sh: lock for a test run, MAKE -> makej
-rwxr-xr-xbuildall.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/buildall.sh b/buildall.sh
index a4435f0..c67974e 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -30,8 +30,7 @@ build () {
cpus=$(grep '^processor' < /proc/cpuinfo | wc -l)
jobs=$((cpus+2))
- makej="make -j$jobs"
- export MAKE="$makej"
+ export makej="make -j$jobs"
rm -rf nasm-* win32 win64 dos macosx os2 rpmbuild doc html
mkdir -p rpmbuild/{BUILD,RPMS,SRPMS,SPECS,SOURCES}
@@ -205,11 +204,15 @@ git clone -s -l $repo git
HEAD=$(cd git && git rev-parse HEAD)
#
-# Test run?
+# Test run? Make sure to lock the working directory so the
+# regular robot doesn't step on us...
#
if [ x"$1" = xtest ]; then
rm -rf /var/tmp/nasmtest
- build $(cat git/version)-test /var/tmp/nasmtest git "$HEAD"
+ (
+ flock -x 8
+ build $(cat git/version)-test /var/tmp/nasmtest git "$HEAD"
+ ) 8< /home/nasmbuild/robot.sh
exit 0
fi