varmod-to-upper.mk revision 1.4
11.4Srillig# $NetBSD: varmod-to-upper.mk,v 1.4 2020/08/28 17:21:02 rillig Exp $
21.1Srillig#
31.2Srillig# Tests for the :tu variable modifier, which returns the words in the
41.2Srillig# variable value, converted to uppercase.
51.1Srillig
61.4Srillig.if ${:UUPPER:tu} != "UPPER"
71.4Srillig.error
81.4Srillig.endif
91.4Srillig
101.4Srillig.if ${:Ulower:tu} != "LOWER"
111.4Srillig.error
121.4Srillig.endif
131.4Srillig
141.4Srillig.if ${:UMixeD case.:tu} != "MIXED CASE."
151.4Srillig.error
161.4Srillig.endif
171.4Srillig
181.3Srillig# The :tu and :tl modifiers operate on the variable value as a single string,
191.3Srillig# not as a list of words. Therefore, the adjacent spaces are preserved.
201.3Srilligmod-tu-space:
211.3Srillig	@echo $@: ${a   b:L:tu:Q}
22