From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 29 04:12:58 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 CEBC216A4CE for ; Fri, 29 Oct 2004 04:12:58 +0000 (GMT) Received: from mail.farley.org (farley.org [67.64.95.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7450B43D1F for ; Fri, 29 Oct 2004 04:12:58 +0000 (GMT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (bwrlvz8gkiej7ltt@thor.farley.org [IPv6:2002:4340:5fcd:1::5]) by mail.farley.org (8.13.1/8.13.1) with ESMTP id i9T4CpkX087047; Thu, 28 Oct 2004 23:12:51 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from thor.farley.org (localhost [127.0.0.1]) by thor.farley.org (8.13.1/8.13.1) with ESMTP id i9T4Co4p044784; Thu, 28 Oct 2004 23:12:50 -0500 (CDT) (envelope-from sean-freebsd@farley.org) Received: from localhost (sean@localhost)i9T4CoVM044781; Thu, 28 Oct 2004 23:12:50 -0500 (CDT) (envelope-from sean-freebsd@farley.org) X-Authentication-Warning: thor.farley.org: sean owned process doing -bs Date: Thu, 28 Oct 2004 23:12:50 -0500 (CDT) From: Sean Farley X-X-Sender: sean@thor.farley.org To: Dan Strick In-Reply-To: <200410281201.i9SC1Vk8002007@mist.nodomain> Message-ID: <20041028225223.W44325@thor.farley.org> References: <200410281201.i9SC1Vk8002007@mist.nodomain> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-hackers@freebsd.org cc: dan@mist.nodomain 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: Fri, 29 Oct 2004 04:12:58 -0000 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