Home | History | Annotate | Line # | Download | only in unit-tests
      1 # $NetBSD: var-scope-global.mk,v 1.1 2022/01/23 16:25:54 rillig Exp $
      2 #
      3 # Tests for global variables, which are the most common variables.
      4 
      5 # Global variables can be assigned and appended to.
      6 GLOBAL=		value
      7 GLOBAL+=	addition
      8 .if ${GLOBAL} != "value addition"
      9 .  error
     10 .endif
     11 
     12 # Global variables can be removed from their scope.
     13 .undef GLOBAL
     14 .if defined(GLOBAL)
     15 .  error
     16 .endif
     17 
     18 all: .PHONY
     19