Subject: build script
To: None <port-vax@netbsd.org>
From: Chuck McManis <cmcmanis@mcmanis.com>
List: port-vax
Date: 08/05/2000 15:23:02
A couple of people have asked how I've set up my build environment, on the
off chance that it might be helpful for other people who are building
NetBSD here is the 'build' script I use (called 'go' and located in
/usr/src) What it does is create a build log in /usr/src/logs (symlinked to
'current') and attempts to build a complete release without stops (note the
-k option)
Generally after a cvs update I will either just type './go &' from the
/usr/src directory of if I'm trying to rebuild everything I'll do that
after the following:
# fresh build
mv /home/source/build /home/source/.past-build
mv /home/source/release /home/source/.past-release
mv /home/source/obj /home/source/.past-obj
mkdir /home/source/build
mkdir /home/source/release
mkdir /home/source/obj
#
# clean up the past obj-> symlinks
#
find . -name obj -type l -exec rm {} \;
./go &
--Chuck
--------------------------------------
#!/bin/sh
#
# A script for kicking off the build that "remembers"
# all the things I want to set. Note that when you've
# actually installed current you probably won't need to
# use -m on make but it doesn't hurt.
#
echo building the system
umask 2
DATE=`date +"%m%d%y%H%M%S"`
LOG=logs/make_log.$DATE
ERR=logs/make_err.$DATE
echo " Make log kept in :$LOG"
echo "Error log kept in :$ERR"
touch $LOG
touch $ERR
rm -f logs/current
rm -f logs/error
ln -s /usr/src/$LOG logs/current
ln -s /usr/src/$ERR logs/error
UPDATE=1 ; export UPDATE
#
# set in /etc/mk.conf
#
#MKMAN=no ; export MKMAN
MKOBJDIRS=yes ; export MKOBJDIRS
#NBUILDJOBS=2 ; export NBUILDJOBS
DESTDIR=/home/source/build ; export DESTDIR
#OBJDIR=/home/source/obj ; export OBJDIR
RELEASEDIR=/home/source/release ; export RELEASEDIR
echo "make -k -m /usr/src/share/mk release 2>$ERR | tee $LOG"
make -k -m /usr/src/share/mk release 2>$ERR | tee $LOG
echo Build stopped >> $LOG
tail -50 $LOG | /usr/bin/Mail -S "VAX build results" cmcmanis@mcmanis.com
exit 0
----------------Contents of /etc/mk.conf
NBUILDJOBS=2
#CFLAGS= -O2
BSDOBJDIR=/home/source/obj
DESTDIR=/home/source/build
MKKERBEROS=no
MKCRYPTO=no
CRYPTOBASE=none
----------------------------------------------------------