Subject: Re: obj.${MACHINE_ARCH}-${OBJECT_FMT}
To: Simon J. Gerraty <sjg@quick.com.au>
From: Ben Harris <bjh21@netbsd.org>
List: tech-userlevel
Date: 04/29/2001 14:58:02
On Sun, 29 Apr 2001, Simon J. Gerraty wrote:

> 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?

How else would it be done?  Make currently only looks for "obj" and
"obj.${MACHINE}", so either we need to change make to look in lots of
other places, or we need to use symlinks.

> 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.

I don't like the idea of placing requirements on the environment,
especially as the required value of MAKEOBJDIR will vary from directory to
directory.

I suppose it might be possible to arrange that the system makefiles spot
when MAKEOBJDIR isn't set and re-exec make with it set appropriately, but
that sounds painful and doesn't handle changing it when crossing into
subdirectories.

-- 
Ben Harris                                                   <bjh21@netbsd.org>
Portmaster, NetBSD/arm26               <URL:http://www.netbsd.org/Ports/arm26/>