Subject: Re: build.sh environment, where to put ?
To: <>
From: David Laight <david@l8s.co.uk>
List: current-users
Date: 11/19/2003 17:02:22
On Wed, Nov 19, 2003 at 05:22:47PM +0100, Juan RP wrote:
> On Wed, 19 Nov 2003 09:25:34 -0700
> emanuel stiebler <emu@ecubics.com> wrote:
>
> > Hi all,
> > I usually put all my variables (DESTDIR, BSDOBJDIR,TOOLDIR) in my .cshrc
> > startup.
> > Is there a better location for those ?
> > Any of the bsd.mk, or ... ?
> > Just asking if anything, or a preference changed ...
>
> Maybe /etc/mk.conf ?
I have a local script that sets the required options:
#!/bin/sh
base=`(cd ..;/bin/pwd)`
machine=i386
while getopts Em:o opt
do
case $opt in
m) machine=$OPTARG;;
*) ;;
\?) break;;
esac
done
[ $(( $OPTIND - 1)) = $# ] && set -- "$@" distribution
[ "$machine" != "i386" ] && suffix=_$machine
destdir=$base/dest$suffix
objdir=$base/obj$suffix
releasedir=$base/release
[ $# = 0 ] && set -- distribution
[ -d $objdir ] || mkdir $objdir || exit 1
[ -d $destdir ] || mkdir $destdir || exit 1
[ -d $releasedir ] || mkdir $releasedir || exit 1
tools=$objdir/tools/tools.`uname -s`-`uname -m`
exec ./build.sh -T $tools -u -U -D $destdir -O $objdir -R $releasedir "$@"
David
--
David Laight: david@l8s.co.uk