From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 29 07:02:14 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 7417F16A4CE for ; Fri, 29 Oct 2004 07:02:14 +0000 (GMT) Received: from n33.kp.t-systems-sfr.com (n33.kp.t-systems-sfr.com [129.247.16.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id A397743D58 for ; Fri, 29 Oct 2004 07:02:11 +0000 (GMT) (envelope-from harti@freebsd.org) Received: from n81.sp.op.dlr.de (n81g.sp.op.dlr.de [129.247.163.1]) i9T71uU577580; Fri, 29 Oct 2004 09:01:56 +0200 Received: from zeus.nt.op.dlr.de (zeus.nt.op.dlr.de [129.247.173.3]) i9T71tI137480; Fri, 29 Oct 2004 09:01:55 +0200 Received: from beagle.kn.op.dlr.de (opkndnwsbsd178 [129.247.173.178]) by zeus.nt.op.dlr.de (8.11.7+Sun/8.9.1) with ESMTP id i9T72Ae03163; Fri, 29 Oct 2004 09:02:11 +0200 (MET DST) Date: Fri, 29 Oct 2004 09:01:57 +0200 (CEST) From: Harti Brandt X-X-Sender: brandt@beagle.kn.op.dlr.de To: Sean Farley In-Reply-To: <20041028225223.W44325@thor.farley.org> Message-ID: <20041029090051.M52069@beagle.kn.op.dlr.de> References: <200410281201.i9SC1Vk8002007@mist.nodomain> <20041028225223.W44325@thor.farley.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Dan Strick cc: freebsd-hackers@freebsd.org Subject: Re: questionable feature in FreeBSD pmake X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Oct 2004 07:02:14 -0000 On Thu, 28 Oct 2004, Sean Farley wrote: SF>On Thu, 28 Oct 2004, Dan Strick wrote: SF> SF>> On Thu, 28 Oct 2004 03:23:02 -0700, Dan Strick wrote: SF>> > SF>> > I just spent a *very* frustrating hour trying to figure out why the SF>> > FreeBSD make program was invoking all commands to make things in a SF>> > subdirectory named "obj". SF> SF>I just noticed this is in the BUGS section of make: SF> The determination of .OBJDIR is contorted to the point of SF> absurdity. SF> SF>> It seems that I have no alternative but to rename my "obj" directory. SF>> Can someone suggest an alternative? Note that it is not possible for SF>> me to set an environment variable (i.e. MAKEOBJDIR) before running SF>> make or to add an option to the make command line. Any fix must be SF>> contained entirely within the makefile. Setting .OBJDIR or MAKEOBJDIR SF>> within the makefile does not work. Placing a "cd .." or "cd SF>> $(.CURDIR)" in front of every set of makefile shell commands is SF>> unthinkable. SF> SF>Why are you unable to do anything with the command-line? Any of these SF>will solve your problem. SF>Bourne: SF>MAKEOBJDIR=/no_obj_here make SF> SF>Bourne or CSH: SF>env MAKEOBJDIR=/no_obj_here make SF> SF>Here is a Makefile that does not use obj/. The special targets can be SF>placed into a file to be included into all your Makefiles. It only SF>suffers from a failed build where it will not rename obj to tmpobj. SF> SF>----------------------- SF>.BEGIN: SF> mv tmpobj obj || mkdir obj SF> SF>.INTERRUPT: SF> mv obj tmpobj .INTERRUPT is dangerous at the moment, because it is not called always and it's sometimes called in the wrong place. I have a fix for this. harti SF> SF>.END: SF> mv obj tmpobj SF> SF>all: SF> touch testing SF> SF>clean: SF> rm -f testing SF>----------------------- SF> SF>Sean SF>