Re: questionable feature in FreeBSD pmake
From: Sean Farley (sean-freebsd_at_farley.org)
Date: 10/29/04
- Previous message: M. Warner Losh: "Re: questionable feature in FreeBSD pmake"
- In reply to: Dan Strick: "Re: questionable feature in FreeBSD pmake"
- Next in thread: Harti Brandt: "Re: questionable feature in FreeBSD pmake"
- Reply: Harti Brandt: "Re: questionable feature in FreeBSD pmake"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 28 Oct 2004 23:12:50 -0500 (CDT) To: Dan Strick <strick@covad.net>
On Thu, 28 Oct 2004, Dan Strick wrote:
> On Thu, 28 Oct 2004 03:23:02 -0700, Dan Strick wrote:
>>
>> I just spent a *very* frustrating hour trying to figure out why the
>> FreeBSD make program was invoking all commands to make things in a
>> subdirectory named "obj".
I just noticed this is in the BUGS section of make:
The determination of .OBJDIR is contorted to the point of
absurdity.
> It seems that I have no alternative but to rename my "obj" directory.
> Can someone suggest an alternative? Note that it is not possible for
> me to set an environment variable (i.e. MAKEOBJDIR) before running
> make or to add an option to the make command line. Any fix must be
> contained entirely within the makefile. Setting .OBJDIR or MAKEOBJDIR
> within the makefile does not work. Placing a "cd .." or "cd
> $(.CURDIR)" in front of every set of makefile shell commands is
> unthinkable.
Why are you unable to do anything with the command-line? Any of these
will solve your problem.
Bourne:
MAKEOBJDIR=/no_obj_here make
Bourne or CSH:
env MAKEOBJDIR=/no_obj_here make
Here is a Makefile that does not use obj/. The special targets can be
placed into a file to be included into all your Makefiles. It only
suffers from a failed build where it will not rename obj to tmpobj.
-----------------------
.BEGIN:
mv tmpobj obj || mkdir obj
.INTERRUPT:
mv obj tmpobj
.END:
mv obj tmpobj
all:
touch testing
clean:
rm -f testing
-----------------------
Sean
-- sean-freebsd@farley.org _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: M. Warner Losh: "Re: questionable feature in FreeBSD pmake"
- In reply to: Dan Strick: "Re: questionable feature in FreeBSD pmake"
- Next in thread: Harti Brandt: "Re: questionable feature in FreeBSD pmake"
- Reply: Harti Brandt: "Re: questionable feature in FreeBSD pmake"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|