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