From owner-freebsd-hackers Mon Sep 23 7:35:30 2002 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 6909F37B401 for ; Mon, 23 Sep 2002 07:35:28 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 182B243E42 for ; Mon, 23 Sep 2002 07:35:27 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 12080 invoked from network); 23 Sep 2002 14:35:25 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 23 Sep 2002 14:35:25 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id 91A462FDAB2; Mon, 23 Sep 2002 16:35:23 +0200 (CEST) Date: Mon, 23 Sep 2002 16:35:23 +0200 From: Roman Neuhauser To: Chuck Robey Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: two make questions Message-ID: <20020923143523.GA30361@freepuppy.bellavista.cz> Mail-Followup-To: Chuck Robey , freebsd-hackers@FreeBSD.ORG References: <20020923133431.GZ30361@freepuppy.bellavista.cz> <20020923095217.O332-100000@april.chuckr.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020923095217.O332-100000@april.chuckr.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG # chuckr@chuckr.org / 2002-09-23 10:06:12 -0400: > On Mon, 23 Sep 2002, Roman Neuhauser wrote: > > I'm not a C programmer (thus not really familiar with make), and I'm > > trying to use it for project management (we write apps in php). I've > > stumbled across a few variable related issues where the actual behavior > > doesn't exactly map to the available documentation (make(1), and the > > pmake paper). See the messages below for complete descriptions. > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103250565427752&w=2 > > http://marc.theaimsgroup.com/?l=freebsd-questions&m=103251441702280&w=2 > > You're trying to treat the make variables as program variables, and that > doesn't work, once you assign a value to them, that's the value you get. > They *do not* work like variables in C or Basic. The rule to follow is > never to attempt to modify a value in a variable. If you need that > specific action, either use the ".for" type constructs, else use shell > variables, which will let you do that. Chuck, thanks a lot for your reply. You're right: I'm viewing Makefiles as sequential programs, which obviously (even to me) is not quite true, but I'm having difficulty getting rid of this. Now, saying "don't do it" is nice, but I'd like to know why. Why doesn't this work? Also, what documentation (besides the source) is there that covers variable scopes? See the second message for the problem description. I can fix the behavior with conditional assignment to DESTDIR (?=) in the Makefile, but still would like to understand what's causing make to behave the way it does. Again, thanks, and HAND. Also, I couldn't find on freebsd.org whether it's required to group-reply on hackers@ (as it is on questions@), so I'm cc'ing you. Sorry if this is not required. You don't need to cc me either way. Roman -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 4:17PM up 5 days, 23:32, 22 users, load averages: 0.03, 0.11, 0.07 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message