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