diff options
author | sjg <sjg@FreeBSD.org> | 2013-04-02 21:31:11 +0000 |
---|---|---|
committer | sjg <sjg@FreeBSD.org> | 2013-04-02 21:31:11 +0000 |
commit | e2bb503df79b3a278b60540c030abad3cc7817e4 (patch) | |
tree | cd72aaf0a299a2f0fc501d1bc3a3e85acc02c0cd /contrib/bmake/unit-tests | |
parent | 4b74a4a19096550736eef03ae63162039a83d0bd (diff) | |
parent | 34e4a9fc1f5a9c585228e8e07c4994ee5789c55c (diff) | |
download | FreeBSD-src-e2bb503df79b3a278b60540c030abad3cc7817e4.zip FreeBSD-src-e2bb503df79b3a278b60540c030abad3cc7817e4.tar.gz |
Update to bmake-20130330
Diffstat (limited to 'contrib/bmake/unit-tests')
-rw-r--r-- | contrib/bmake/unit-tests/Makefile.in | 7 | ||||
-rw-r--r-- | contrib/bmake/unit-tests/export-env | 24 | ||||
-rw-r--r-- | contrib/bmake/unit-tests/test.exp | 8 |
3 files changed, 37 insertions, 2 deletions
diff --git a/contrib/bmake/unit-tests/Makefile.in b/contrib/bmake/unit-tests/Makefile.in index a64a074..bfd29b2 100644 --- a/contrib/bmake/unit-tests/Makefile.in +++ b/contrib/bmake/unit-tests/Makefile.in @@ -1,6 +1,6 @@ -# $Id: Makefile.in,v 1.40 2012/12/28 21:28:19 sjg Exp $ +# $Id: Makefile.in,v 1.42 2013/03/23 02:31:13 sjg Exp $ # -# $NetBSD: Makefile,v 1.35 2012/11/09 19:08:28 sjg Exp $ +# $NetBSD: Makefile,v 1.36 2013/03/22 16:36:46 sjg Exp $ # # Unit tests for make(1) # The main targets are: @@ -28,6 +28,7 @@ SUBFILES= \ error \ export \ export-all \ + export-env \ doterror \ dotwait \ forloop \ @@ -72,10 +73,12 @@ TOOL_TR?= tr TOOL_DIFF?= diff DIFF_FLAGS?= @diff_u@ +.if defined(.PARSEDIR) # ensure consistent results from sort(1) LC_ALL= C LANG= C .export LANG LC_ALL +.endif # The driver. # We always pretend .MAKE was called 'make' diff --git a/contrib/bmake/unit-tests/export-env b/contrib/bmake/unit-tests/export-env new file mode 100644 index 0000000..b6ce6a2 --- /dev/null +++ b/contrib/bmake/unit-tests/export-env @@ -0,0 +1,24 @@ +# $Id: export-env,v 1.1.1.1 2013/03/23 02:26:59 sjg Exp $ + +# our normal .export, subsequent changes affect the environment +UT_TEST=this +.export UT_TEST +UT_TEST:= ${.PARSEFILE} + +# not so with .export-env +UT_ENV=exported +.export-env UT_ENV +UT_ENV=not-exported + +# gmake style export goes further; affects nothing but the environment +UT_EXP=before-export +export UT_EXP=exported +UT_EXP=not-exported + +all: + @echo make:; ${UT_TEST UT_ENV UT_EXP:L:@v@echo $v=${$v};@} + @echo env:; ${UT_TEST UT_ENV UT_EXP:L:@v@echo $v=$${$v};@} + + + + diff --git a/contrib/bmake/unit-tests/test.exp b/contrib/bmake/unit-tests/test.exp index 368dc31..b6fad78 100644 --- a/contrib/bmake/unit-tests/test.exp +++ b/contrib/bmake/unit-tests/test.exp @@ -43,6 +43,14 @@ UT_OK=good UT_OKDIR=unit-tests UT_TEST=export-all UT_ZOO=hoopie +make: +UT_TEST=export-env +UT_ENV=not-exported +UT_EXP=not-exported +env: +UT_TEST=export-env +UT_ENV=exported +UT_EXP=exported At first, I am happy and now: sad |