Subject: Re: YAAPACW
To: I can teach you how to fish... <greywolf@autodesk.com>
From: Michael L. VanLoon -- HeadCandy.com <michaelv@HeadCandy.com>
List: current-users
Date: 11/08/1994 20:21:34
> - Since every time you run config{,.new}, you need to cd to the compile
> directory and run make depend, why does config not automagically
> run the make depend for you? It reminds you every time you run it:
> "Don't forget to run \"make depend\"."
>
> It would be trivial to add this and probably a bit more in-line with
> the present day. Are there times when you run config and don't want to
> run "make depend" in ../compile/!$ ?
``Config'' configs, it doesn't make. I don't think it really has any
business runnig a make depend. That's what scripts are for.
Here's my home-grown ``doconfig'' script:
---------- >8 ----- Begin doconfig ----- 8< ----------
#!/bin/sh
#
# By Michael VanLoon <michaelv@iastate.edu>
#
# Use at your own risk. No warranty implied. Mileage may vary.
#
# Usage: doconfig CONFIGFILENAME
#
if [ $# -ne 1 -o ! -f $1 ]; then
echo "USAGE: doconfig CONFIGFILE"
exit 1
fi
arch=`machine`
conf=$1
export MAKEFLAGS='-j4'
if [ -f /sys/arch/$arch/compile/$conf/Makefile ]; then
echo ' *** make clean *** '
cd /sys/arch/$arch/compile/$conf
make clean
else
echo ' *** skipping make clean -- new kernel config *** '
fi
echo ' *** config *** '
cd /sys/arch/$arch/conf
config $conf || {
echo '!!!*** Error in config file:' $conf '***!!!'
exit 2
}
echo ' *** make depend *** '
cd /sys/arch/$arch/compile/$conf
make depend || {
echo '!!!*** Error in make depend ***!!!'
exit 3
}
echo ' *** make *** '
make || {
echo '!!!*** Error in make ***!!!'
exit 4
}
echo ' *** kernel build completed successfully *** '
ls -lgF ./netbsd /netbsd*
size ./netbsd /netbsd*
exit 0
---------- >8 ----- End doconfig ----- 8< ----------
-----------------------------------------------------------------------------
Michael L. VanLoon michaelv@HeadCandy.com michaelv@iastate.edu
Free your mind and your machine -- NetBSD free un*x for PC/Mac/Amiga/etc.
Working NetBSD ports: 386+PC, Mac, Amiga, HP300, Sun3, Sun4c, PC532
In progress: DEC pmax (MIPS R2k/3k), VAX, Sun4m
-----------------------------------------------------------------------------