06b9b3e0ad
Quite a lot of churn on style, but lots of good work refactoring complicated functions and lots more unit-tests. Thanks mostly to rillig at NetBSD Some interesting entries from ChangeLog o .MAKE.{UID,GID} represent uid and gid running make. o allow env var MAKE_OBJDIR_CHECK_WRITABLE=no to skip writable checks in InitObjdir. Explicit .OBJDIR target always allows read-only directory. o add more unit tests for META MODE Merge commit '8e11a9b4250be3c3379c45fa820bff78d99d5946' into main Change-Id: I464fd4c013067f0915671c1ccc96d2d8090b2b9c
34 lines
761 B
Makefile
34 lines
761 B
Makefile
# $NetBSD: directive-unexport.mk,v 1.7 2020/12/13 01:07:54 rillig Exp $
|
|
#
|
|
# Tests for the .unexport directive.
|
|
#
|
|
# Before 2020-12-13, misspelled directives like ".unexporting" or
|
|
# ".unexport-en" had not been detected properly.
|
|
#
|
|
# See also:
|
|
# directive-misspellings.mk
|
|
|
|
# First, export 3 variables.
|
|
UT_A= a
|
|
UT_B= b
|
|
UT_C= c
|
|
.export UT_A UT_B UT_C
|
|
|
|
# Show the exported variables and their values.
|
|
.info ${:!env|sort|grep '^UT_'!}
|
|
.info ${.MAKE.EXPORTED}
|
|
|
|
# XXX: Now try to unexport all of them. The variables are still exported
|
|
# but not mentioned in .MAKE.EXPORTED anymore.
|
|
# See the ":N" in Var_UnExport for the implementation.
|
|
*= asterisk
|
|
.unexport *
|
|
|
|
.info ${:!env|sort|grep '^UT_'!}
|
|
.info ${.MAKE.EXPORTED}
|
|
|
|
.unexport # oops: missing argument
|
|
|
|
all:
|
|
@:;
|