Subject: Re: obj.${MACHINE_ARCH}-${OBJECT_FMT}
To: Ben Harris <bjh21@netbsd.org>
From: Simon J. Gerraty <sjg@quick.com.au>
List: tech-userlevel
Date: 04/29/2001 02:13:13
I think its handy to provide for a OBJDIRSUFFIX that may be independent
of MACHINE*. I'm not so crazy about the symlink bit - perhaps there
should be a knob to enable that?
FWIW you could do this sort of thing use MAKEOBJDIR in the environment:
MAKEOBJDIR='obj.${MACHINE_ARCH}-${OBJECT_FMT}'
note the single quotes - MACHINE_ARCH and OBJECT_FMT won't be resolved
until make goes to see if that dir exists. This would allow the sparc
folk to just change MACHINE_ARCH in the environment, and not have to
worry about the symlinks.
BTW you can do quite cool things with MAKEOBJDIR:
MAKEOBJDIR='${.CURDIR:S,${SRCTOP},${OBJTOP},}'
allows you to create an object tree under OBJTOP which parallels SRCTOP
in much the same way MAKEOBJDIRPREFIX works, but neater - eg. you get:
/var/obj/bin/cat
instead of:
/var/obj/u2/sjg/NetBSD/current/src/bin/cat
--sjg