Subject: Re: obj dir not created (subdir sendmail/cf/cf)
To: Jachym Holecek <email@example.com>
From: None <firstname.lastname@example.org>
Date: 06/20/2005 23:50:58
On Mon, Jun 20, 2005 at 09:08:44PM +0100, David Laight wrote:
> You need to realise that the make binary changes its own current directory
> (and hence that of everything it runs) to be the 'object directory' .
> So any program that just creates a file will create it in the object
> directory, not the source directory.
>  The directory $MAKEOBJDIR, $MAKEOBJDIRPREFIX/$(pwd) or $(pwd)/obj 
> if the relevant environment variable is set and the directory exists.
> Code is right at the start of main().
>  The cd to $(pwd)/obj is rather unexpected, and causes some makefiles
> that a simple SVR4 make will execute to break under NetBSD - causing some
> packages to require gmake!
Thanks, got it! Uh... indeed "obj/" is kind of a "reserved word" and if
it happens to be a subdir of cwd consequences might be surprising...
And now I realize that when distributing sources I have to ensure that
MAKEOBJDIRPREFIX and MAKEOBJDIR are unset before calling a make(1)
on a NetBSD host if I don't want things to go not exactly the way I
expect them to go if these are set and the dirs happen to exist
I was naively assuming that setting the special target .POSIX will
give me a bare bone behavior (well, GNU make doesn't seem to care a
penny about that), but this is not the case (there is already a thread
on tech about what a compiler is supposed to do in the grey lands of
standards, so this is not to launch another one).
I wonder if I should not require to create a posix_unprivileged_user
with the strict mandatory env variables set, the LC_ALL=C and so on in
a chrooted sandbox to be on the safe side when building.
Thierry Laronde (Alceste) <tlaronde +AT+ polynum +dot+ com>
http://www.kergis.org/ | http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C