Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.1 / (download) - annotate - [select for diffs], Mon Apr 18 15:06:28 2022 UTC (9 months, 2 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base,
netbsd-10,
HEAD
make: only switch to POSIX mode if '.POSIX:' is the first line https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html says that in order to make a makefile POSIX-conforming, its first non-comment line must be the special dependency line '.POSIX:' without any source dependencies. Previously, make switched to POSIX mode even if such a line occurred anywhere else, which was allowed by POSIX but was deep in the "unspecified behavior" area. For NetBSD make, there is no big difference since it doesn't ship any <posix.mk> file, this change mainly affects the bmake distribution. Previously, makefiles that contain '.POSIX:' somewhere in the middle could fail due to <posix.mk> resetting .SUFFIXES, among other things. Suggested by Simon J. Gerraty, who also reviewed an earlier version of this change.