From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 30 01:39:36 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 357F216A4CE for ; Sat, 30 Oct 2004 01:39:36 +0000 (GMT) Received: from mail825.megamailservers.com (mail825.carrierinternetsolutions.com [69.49.106.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id C2E1F43D41 for ; Sat, 30 Oct 2004 01:39:35 +0000 (GMT) (envelope-from strick@covad.net) X-POP-User: sftravel.covad.net Received: from mist.nodomain (h-67-101-99-151.snfccasy.dynamic.covad.net [67.101.99.151])i9U1dGg5032247; Fri, 29 Oct 2004 21:39:17 -0400 Received: from mist.nodomain (localhost [127.0.0.1]) by mist.nodomain (8.12.11/8.12.11) with ESMTP id i9U1dEup000640; Fri, 29 Oct 2004 18:39:14 -0700 (PDT) (envelope-from dan@mist.nodomain) Received: (from dan@localhost) by mist.nodomain (8.12.11/8.12.11/Submit) id i9U1dDnY000639; Fri, 29 Oct 2004 18:39:13 -0700 (PDT) (envelope-from dan) Date: Fri, 29 Oct 2004 18:39:13 -0700 (PDT) From: Dan Strick Message-Id: <200410300139.i9U1dDnY000639@mist.nodomain> To: freebsd-hackers@freebsd.org cc: dan@mist.nodomain cc: sean-freebsd@farley.org Subject: Re: questionable feature in FreeBSD pmake X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2004 01:39:36 -0000 > > 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 > My goal was to write a generic makefile that would work on almost any mostly POSIX compliant OS. I wanted something I could just walk up to and say "make" without having to remember that the makefile is special and has to be invoked in a special way. If I could just add some trivial magic to the makefile that suppresses the special "obj" feature on systems that have it but has no effect on other systems, I would do that. It seems that there is no such magic. Thank you all for your suggestions. I wish to give a special award for extra creativity to Sean Farley for his makefile enhancements that work around the problem by temporarily renaming the "obj" subdirectory while the makefile is not active (i.e. when you would most care what the subdirectory was called). I think I will work around the problem by calling the directory "objs" instead of "obj". This does not mean that I forgive whoever it was that invented the feature I don't like. He should have checked with an adult first. (Ooh, it feels good to say that! :-) I repeat the observation that this feature could have been implemented in a way that would have made it unlikely to be invoked accidentally. It seems that the feature is now so widely spread throughout the BSD community that is way too late to get the blemish fixed now. I will have to settle for finding some comfort in the realization that I have far bigger problems than the inability to use the directory name "obj" in some circumstances. Dan Strick strick@covad.net