5f60a7de65
Mike M. Volokhov <mishka@apk.od.ua>
34 lines
517 B
Plaintext
34 lines
517 B
Plaintext
# $Id: varcmd,v 1.2 2005/06/01 17:17:34 sjg Exp $
|
|
#
|
|
# Test behaviour of recursive make and vars set on command line.
|
|
|
|
FU=fu
|
|
FOO?=foo
|
|
.if !empty(.TARGETS)
|
|
TAG=${.TARGETS}
|
|
.endif
|
|
TAG?=default
|
|
|
|
all: one
|
|
|
|
show:
|
|
@echo "${TAG} FU=<v>${FU}</v> FOO=<v>${FOO}</v> VAR=<v>${VAR}</v>"
|
|
|
|
one: show
|
|
@${.MAKE} -f ${MAKEFILE} FU=bar FOO=goo two
|
|
|
|
two: show
|
|
@${.MAKE} -f ${MAKEFILE} three
|
|
|
|
three: show
|
|
@${.MAKE} -f ${MAKEFILE} four
|
|
|
|
|
|
.ifmake four
|
|
VAR=Internal
|
|
.MAKEOVERRIDES+= VAR
|
|
.endif
|
|
|
|
four: show
|
|
@${.MAKE} -f ${MAKEFILE} show
|