aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2003-01-24 04:57:21 +0000
committerKris Kennaway <kris@FreeBSD.org>2003-01-24 04:57:21 +0000
commita4ad73ca23759c5396e8dc8e4bda613b44805484 (patch)
tree3df490ce138c441debcf25810a0b33e63baddff9 /Tools
parent6d119d605fefddd583f2f79eeb28c0c122462fa0 (diff)
downloadports-a4ad73ca23759c5396e8dc8e4bda613b44805484.tar.gz
ports-a4ad73ca23759c5396e8dc8e4bda613b44805484.zip
Script to automate the process of cvs updating the build tree, performing
the buildworld, installworld and 'make distribute' necessary for preparing a bindist.
Notes
Notes: svn path=/head/; revision=73919
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/makeworld91
1 files changed, 91 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/makeworld b/Tools/portbuild/scripts/makeworld
new file mode 100755
index 000000000000..1df424003fc1
--- /dev/null
+++ b/Tools/portbuild/scripts/makeworld
@@ -0,0 +1,91 @@
+#!/bin/sh
+
+pb=/var/portbuild
+
+if [ $# -lt 2 ]; then
+ echo "usage: makeparallel arch branch [args]"
+ exit 1
+fi
+
+arch=$1
+branch=$2
+shift 2
+
+. ${pb}/${arch}/portbuild.conf
+. ${pb}/scripts/buildenv
+
+buildenv ${pb} ${arch} ${branch}
+
+# These confuse make world; remove them
+unset MACHINE_ARCH
+unset ARCH
+
+client=0
+nocvs=0
+
+# optional arguments
+while [ $# -gt 0 ]; do
+ case "x$1" in
+ x-client)
+ client=1
+ ;;
+ x-nocvs)
+ nocvs=1
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+if [ "$client" = "1" ]; then
+ cd ${pb}/${arch}/src-client
+ shift 1
+else
+ cd ${pb}/${arch}/${branch}/src
+ export __MAKE_CONF=/dev/null
+fi
+
+if [ "$nocvs" = "0" ]; then
+ echo "==> Updating source tree"
+ cvs -Rq update -Pd
+ error=$?
+ if [ "$error" != "0" ]; then
+ exit 1
+ fi
+fi
+
+env
+
+echo "==> Starting make buildworld"
+make buildworld $*
+error=$?
+if [ "$error" != "0" ]; then
+ exit $?
+fi
+
+echo "==> Cleaning up chroot"
+rm -rf /var/chroot/
+chflags -R noschg /var/chroot/
+rm -rf /var/chroot/
+mkdir /var/chroot/
+
+echo "==> Starting make installworld"
+if [ "$client" = "0" ]; then
+ make installworld DESTDIR=/var/chroot
+ error=$?
+ if [ "$error" != "0" ]; then
+ exit $?
+ fi
+
+ echo "==> Starting make distribute"
+ cd etc
+ make distribute DISTRIBUTION=/var/chroot/
+ error=$?
+ if [ "$error" != "0" ]; then
+ exit $?
+ fi
+else
+ echo "==> Not doing installworld of client source tree"
+fi