vardebug.mk revision 1.1 1 # $NetBSD: vardebug.mk,v 1.1 2020/07/25 21:19:29 rillig Exp $
2 #
3 # Demonstrates the debugging output for var.c.
4
5 RELEVANT= yes
6
7 VAR= added # VarAdd
8 VAR= overwritten # Var_Set
9 .undef VAR # Var_Delete (found)
10 .undef VAR # Var_Delete (not found)
11
12 # The variable with the empty name cannot be set at all.
13 ${:U}= empty name # Var_Set
14 ${:U}+= empty name # Var_Append
15
16 FROM_CMDLINE= overwritten # Var_Set (ignored)
17
18 VAR= 1
19 VAR+= 2
20 VAR+= 3
21
22 .if ${VAR:M[2]} # VarMatch
23 .endif
24 .if ${VAR:N[2]} # VarNoMatch (no debug output)
25 .endif
26
27 .if ${VAR:S,2,two,} # VarGetPattern
28 .endif
29
30 .if ${VAR:Q} # VarQuote
31 .endif
32
33 .if ${VAR:tu:tl:Q} # ApplyModifiers
34 .endif
35
36 .undef ${:UVAR} # Var_Delete
37
38 RELEVANT= no
39
40 all:
41 @:
42