Lines Matching full:env
7 all: .PHONY level_1 set-env-same set-env-different
9 # expect: level 1: variable 0, env 1
11 @printf 'level 1: variable %s, env %s\n' ${.MAKE.LEVEL} "$$${.MAKE.LEVEL.ENV}"
14 # expect: level 2: variable 1, env 2
16 @printf 'level 2: variable %s, env %s\n' ${.MAKE.LEVEL} "$$${.MAKE.LEVEL.ENV}"
19 # The .unexport-env directive clears the environment, except for the
20 # .MAKE.LEVEL.ENV make variable, which by default refers to the MAKELEVEL
23 .unexport-env
26 # expect: level 3: variable 2, env 3
28 @printf 'level 3: variable %s, env %s\n' ${.MAKE.LEVEL} "$$${.MAKE.LEVEL.ENV}"
37 # .MAKE.LEVEL.ENV variable in the scope for command line variables, and these
40 # internal .MAKE.LEVEL.ENV variable in the global scope but make it read-only
44 set-env-same: .PHONY
46 @${MAKE} -f ${MAKEFILE} ok .MAKE.LEVEL.ENV=${.MAKE.LEVEL.ENV} || echo "${.TARGET}: exit $$?"
49 # expect: make: Cannot override read-only global variable ".MAKE.LEVEL.ENV" with a command line var…
50 set-env-different: .PHONY
52 @${MAKE} -f ${MAKEFILE} ok .MAKE.LEVEL.ENV=CUSTOM || echo "${.TARGET}: exit $$?"