1 1.2 rillig # $NetBSD: posix-expansion.mk,v 1.2 2025/04/13 09:34:43 rillig Exp $ 2 1.1 rillig # 3 1.1 rillig # https://pubs.opengroup.org/onlinepubs/9799919799/utilities/make.html#tag_20_76_13_05 4 1.1 rillig # 5 1.1 rillig # In POSIX mode, when expanding an expression containing modifiers, the 6 1.1 rillig # modifiers specified in POSIX take precedence over the BSD-style modifiers. 7 1.1 rillig 8 1.1 rillig .POSIX: 9 1.1 rillig 10 1.1 rillig 11 1.1 rillig MOD_SUBST= S s from to 12 1.1 rillig # The modifier contains a "=" and is thus the POSIX modifier. 13 1.1 rillig .if ${MOD_SUBST:S=from=to=} != "from=to= s from to" 14 1.1 rillig . error 15 1.1 rillig .endif 16 1.1 rillig # The modifier does not contain a "=" and thus falls back to the BSD modifier. 17 1.1 rillig .if ${MOD_SUBST:S,from,to,} != "S s to to" 18 1.1 rillig . error 19 1.1 rillig .endif 20 1.1 rillig 21 1.1 rillig 22 1.1 rillig all: 23