1 1.6 rillig # $NetBSD: varmod-unique.mk,v 1.6 2021/12/05 22:37:58 rillig Exp $ 2 1.1 rillig # 3 1.2 rillig # Tests for the :u variable modifier, which discards adjacent duplicate 4 1.2 rillig # words. 5 1.1 rillig 6 1.6 rillig .if ${1 2 1:L:u} != "1 2 1" 7 1.6 rillig . warning The modifier ':u' only merges _adjacent_ duplicate words. 8 1.3 rillig .endif 9 1.3 rillig 10 1.6 rillig .if ${1 2 2 3:L:u} != "1 2 3" 11 1.6 rillig . warning The modifier ':u' must merge adjacent duplicate words. 12 1.3 rillig .endif 13 1.3 rillig 14 1.6 rillig .if ${:L:u} != "" 15 1.6 rillig . warning The modifier ':u' must do nothing with an empty word list. 16 1.3 rillig .endif 17 1.3 rillig 18 1.6 rillig .if ${ :L:u} != "" 19 1.5 rillig . warning The modifier ':u' must normalize the whitespace. 20 1.5 rillig .endif 21 1.5 rillig 22 1.6 rillig .if ${word:L:u} != "word" 23 1.6 rillig . warning The modifier ':u' must do nothing with a single-element word list. 24 1.3 rillig .endif 25 1.3 rillig 26 1.6 rillig .if ${ word :L:u} != "word" 27 1.5 rillig . warning The modifier ':u' must normalize the whitespace. 28 1.5 rillig .endif 29 1.5 rillig 30 1.6 rillig .if ${1 1 1 1 1 1 1 1:L:u} != "1" 31 1.6 rillig . warning The modifier ':u' must merge _all_ adjacent duplicate words. 32 1.3 rillig .endif 33 1.3 rillig 34 1.6 rillig .if ${ 1 2 1 1 :L:u} != "1 2 1" 35 1.6 rillig . warning The modifier ':u' must normalize whitespace between the words. 36 1.4 rillig .endif 37 1.4 rillig 38 1.6 rillig .if ${1 1 1 1 2:L:u} != "1 2" 39 1.4 rillig . warning Duplicate words at the beginning must be merged. 40 1.4 rillig .endif 41 1.4 rillig 42 1.6 rillig .if ${1 2 2 2 2:L:u} != "1 2" 43 1.4 rillig . warning Duplicate words at the end must be merged. 44 1.3 rillig .endif 45 1.1 rillig 46 1.1 rillig all: 47