(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 [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to