Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 09:07:07 +0200
From:      Roman Neuhauser <neuhauser@bellavista.cz>
To:        freebsd-questions <freebsd-questions@freebsd.org>
Subject:   make (pmake) question
Message-ID:  <20020920070707.GF379@freepuppy.bellavista.cz>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020920070707.GF379>