From owner-freebsd-questions Fri Sep 20 2:33:21 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 633B937B401 for ; Fri, 20 Sep 2002 02:33:19 -0700 (PDT) Received: from mail.thundernet.cz (mail.thundernet.cz [62.77.87.114]) by mx1.FreeBSD.org (Postfix) with SMTP id EE28143E42 for ; Fri, 20 Sep 2002 02:33:17 -0700 (PDT) (envelope-from neuhauser@bellavista.cz) Received: (qmail 9035 invoked from network); 20 Sep 2002 09:33:10 -0000 Received: from unknown (HELO freepuppy.bellavista.cz) (62.168.44.50) by mail.thundernet.cz with SMTP; 20 Sep 2002 09:33:10 -0000 Received: by freepuppy.bellavista.cz (Postfix, from userid 1001) id D98AA2FDAB2; Fri, 20 Sep 2002 11:33:08 +0200 (CEST) Date: Fri, 20 Sep 2002 11:33:08 +0200 From: Roman Neuhauser To: freebsd-questions Subject: another make (pmake) question Message-ID: <20020920093308.GA30361@freepuppy.bellavista.cz> Mail-Followup-To: freebsd-questions References: <20020920070707.GF379@freepuppy.bellavista.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020920070707.GF379@freepuppy.bellavista.cz> 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 (if you know a better place i should be asking these questions, do point me at those.) Another make question... It would appear that variables have at least two scopes, but parallel, not nested. Example: DESTDIR= SOURCES= foo bar baz TARGETS:= ${SOURCES:C;^.+$;${DESTDIR}/&;} SRCFILE= ${.TARGET:C,^${DESTDIR}/,,} .BEGIN: @echo "\$${DESTDIR}: ${DESTDIR}" @echo "\$${TARGETS}: ${TARGETS}" all: ${TARGETS} ${TARGETS}: ${SRCFILE} @echo "SRC: ${SRCFILE} -> TGT: ${.TARGET}" @#install ${SRCFILE} ${.TARGET} .PHONY: all roman@freepuppy ~/tmp 1126:0 > make all DESTDIR=/tmp/maketest ${DESTDIR}: /tmp/maketest ${TARGETS}: /foo /bar /baz Graph cycles through /foo Graph cycles through /bar Graph cycles through /baz `all' not remade because of errors. here, DESTDIR has a value in the .BEGIN target "body", but not outside it. how come the commandline assignment overrides the value at one place, but not the other? -- begin 666 nonexistent.vbs FreeBSD 4.7-RC 11:24AM up 2 days, 18:39, 19 users, load averages: 0.04, 0.04, 0.00 end To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message