head     1.1;
branch   1.1.1;
access   ;
symbols  FROMHEAD-20130225:1.1.1.1 FROMHEAD:1.1.1;
locks    ; strict;
comment  @# @;


1.1
date     2013.02.25.01.33.23;  author dholland;  state Exp;
branches 1.1.1.1;
next     ;

1.1.1.1
date     2013.02.25.01.33.23;  author dholland;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@# $Id: varcmd,v 1.1.1.1 2013/02/25 00:59:50 dholland 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} five

M = x
V.y = is y
V.x = is x
V := ${V.$M}
K := ${V}

show-v:
	@@echo '${TAG} v=${V} k=${K}'

five:	show show-v
	@@${.MAKE} -f ${MAKEFILE} M=y six

six:	show-v
	@@${.MAKE} -f ${MAKEFILE} V=override show-v

@


1.1.1.1
log
@Import a copy of make from HEAD. I'm going to be beating this one like
a rented mule. :-)
   
For various reasons it seems like using othersrc for this particular
hacking run is a better idea than using a branch in src; for one thing
I'm likely to be adding and removing files, and for another it is more 
likely that this version will become a guide for making more measured
updates to the master version than that it will eventually itself
become the master version.

try 2: don't try to use HEAD as the branch tag as it makes CVS very upset.

@
text
@@
