Re: read only /usr/src & build.sh
Jan Danielsson <[email protected]> Sat, 10 Nov 2007 11:47:52 +0100
| Newsgroups | gmane.os.netbsd.help |
|---|---|
| Organization | La cosa nostra |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Aleksey Cheusov wrote: > Is it really possible to build NetBSD with read only /usr/src? > Whatever build.sh options or mk.conf variables I tried to use, > build.sh always tries to write to /usr/src > > > Always set variables: > MKUNPRIVED= yes > TOOLDIR= /usr/obj/tools > DESTDIR= /usr/obj/destdir > RELEASEDIR= /usr/obj/release > X11SRCDIR= /usr/xsrc If you're doing that a lot in different places, you can use something like this: - --[prep_build_env.sh]-------------------------- #!/bin/sh ARCH=`uname -m` BASE=`pwd` if [ $# -gt 0 ] ; then ARCH=$1 fi export TOOLDIR=$BASE/tools export DESTDIR=$BASE/dest.$ARCH export RELEASEDIR=$BASE/release export MAKEOBJDIRPREFIX=$BASE/obj.$ARCH if ! [ -d $TOOLDIR ] ; then mkdir -p $TOOLDIR fi if ! [ -d $DESTDIR ] ; then mkdir -p $DESTDIR fi if ! [ -d $RELEASEDIR ] ; then mkdir -p $RELEASEDIR fi if ! [ -d $MAKEOBJDIRPREFIX ] ; then mkdir -p $MAKEOBJDIRPREFIX fi - --[prep_build_env.sh]-------------------------- Go to the directory you want the build to end up in, and type: $ . prep_build_env.sh Now run build.sh as usual. - -- Kind regards, Jan Danielsson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (NetBSD) iD8DBQFHNYxYuPlHKFfKXTYRCgpNAJoDAeM+MrNH9MsjXn9DnVEdelLszQCfZnm1 FbE0Wqa2ztd0SulroSuAGzE= =pe2W -----END PGP SIGNATURE-----