From owner-freebsd-questions Fri Sep 20 0: 7:17 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 993D237B401 for ; Fri, 20 Sep 2002 00:07:16 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id 48B2943E75 for ; Fri, 20 Sep 2002 00:07:15 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 7331 invoked from network); 20 Sep 2002 07:07:08 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 20 Sep 2002 07:07:08 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id EA3832FDAB2; Fri, 20 Sep 2002 09:07:07 +0200 (CEST) Date: Fri, 20 Sep 2002 09:07:07 +0200 From: Roman Neuhauser To: freebsd-questions Subject: make (pmake) question Message-ID: <20020920070707.GF379@freepuppy.bellavista.cz> Mail-Followup-To: freebsd-questions Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I've been struggling a few make problems, where the actual behavior seems to differ from the documentation. It's more than likely that something just hasn't gotten through my thick skull, so I'm looking for explanations. For starters: variable assignment with expansion. make(1): := Assign with expansion, i.e. expand the value before assigning it to the variable. Normally, expansion is not done until the variable is referenced. compare this with the behavior of this makefile: LOCALDESTDIR:= ${DESTDIR}/foo DESTDIR:= ${DESTDIR}/bar foo: @echo ${LOCALDESTDIR} bar: @echo ${DESTDIR} .PHONY: foo bar roman@freepuppy ~/tmp 1023:0 > make DESTDIR=dir foo bar dir/foo dir -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 8:45AM up 2 days, 16 hrs, 25 users, load averages: 0.00, 0.00, 0.00 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message