summaryrefslogtreecommitdiff
path: root/usr.bin/make/unit-tests/var-scope-global.mk
blob: 02ed8fe701c0b8ebb6f0b5e306279ca42d7c0895 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# $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