mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-22 10:48:02 +00:00
![Simon J. Gerraty](/assets/img/avatar_default.png)
Features of interest: Allow setting target local variables (similar to gmake) In META_MODE .MAKE.META.CMP_FILTER can be used for filtering commands before comparion. contrib/bmake/mk/cc-wrap.mk is an example of using these See ChangeLog for the gory details.
19 lines
391 B
Makefile
19 lines
391 B
Makefile
# $NetBSD: var-scope-global.mk,v 1.1 2022/01/23 16:25:54 rillig Exp $
|
|
#
|
|
# Tests for global variables, which are the most common variables.
|
|
|
|
# Global variables can be assigned and appended to.
|
|
GLOBAL= value
|
|
GLOBAL+= addition
|
|
.if ${GLOBAL} != "value addition"
|
|
. error
|
|
.endif
|
|
|
|
# Global variables can be removed from their scope.
|
|
.undef GLOBAL
|
|
.if defined(GLOBAL)
|
|
. error
|
|
.endif
|
|
|
|
all: .PHONY
|