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