2023-01-28 00:23:54 +00:00
|
|
|
# $NetBSD: varmod-to-lower.mk,v 1.6 2022/11/29 23:54:55 rillig Exp $
|
2020-09-05 16:11:04 +00:00
|
|
|
#
|
2023-01-28 00:23:54 +00:00
|
|
|
# Tests for the :tl variable modifier, which converts the expression value
|
|
|
|
# to lowercase.
|
2020-11-20 03:54:37 +00:00
|
|
|
#
|
|
|
|
# TODO: What about non-ASCII characters? ISO-8859-1, UTF-8?
|
2020-09-05 16:11:04 +00:00
|
|
|
|
|
|
|
.if ${:UUPPER:tl} != "upper"
|
2020-11-07 19:39:21 +00:00
|
|
|
. error
|
2020-09-05 16:11:04 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${:Ulower:tl} != "lower"
|
2020-11-07 19:39:21 +00:00
|
|
|
. error
|
2020-09-05 16:11:04 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${:UMixeD case.:tl} != "mixed case."
|
2020-11-07 19:39:21 +00:00
|
|
|
. error
|
2020-09-05 16:11:04 +00:00
|
|
|
.endif
|
|
|
|
|
2023-01-28 00:23:54 +00:00
|
|
|
# The ':tl' modifier works on the whole string, without splitting it into
|
|
|
|
# words.
|
|
|
|
.if ${:Umultiple spaces:tl} != "multiple spaces"
|
|
|
|
. error
|
|
|
|
.endif
|
|
|
|
|
|
|
|
all: .PHONY
|