1 1.5 rillig # $NetBSD: export-env.mk,v 1.5 2023/06/01 20:56:35 rillig Exp $ 2 1.1 apb 3 1.1 apb # our normal .export, subsequent changes affect the environment 4 1.4 rillig UT_TEST= this 5 1.1 apb .export UT_TEST 6 1.4 rillig UT_TEST:= ${.PARSEFILE} 7 1.1 apb 8 1.1 apb # not so with .export-env 9 1.4 rillig UT_ENV= exported 10 1.1 apb .export-env UT_ENV 11 1.4 rillig UT_ENV= not-exported 12 1.1 apb 13 1.1 apb # gmake style export goes further; affects nothing but the environment 14 1.1 apb UT_EXP=before-export 15 1.1 apb export UT_EXP=exported 16 1.1 apb UT_EXP=not-exported 17 1.1 apb 18 1.2 sjg UT_LIT= literal ${UT_TEST} 19 1.2 sjg .export-literal UT_LIT 20 1.2 sjg 21 1.1 apb all: 22 1.2 sjg @echo make:; ${UT_TEST UT_ENV UT_EXP UT_LIT:L:@v@echo $v=${$v};@} 23 1.2 sjg @echo env:; ${UT_TEST UT_ENV UT_EXP UT_LIT:L:@v@echo $v=$${$v};@} 24