Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   rillig
Date:           Mon Apr 18 15:06:28 UTC 2022

Modified Files:
        src/distrib/sets/lists/tests: mi
        src/usr.bin/make: main.c make.1 make.h parse.c
        src/usr.bin/make/unit-tests: Makefile
Added Files:
        src/usr.bin/make/unit-tests: deptgt-posix.exp deptgt-posix.mk

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.1192 -r1.1193 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.579 -r1.580 src/usr.bin/make/main.c
cvs rdiff -u -r1.307 -r1.308 src/usr.bin/make/make.1
cvs rdiff -u -r1.299 -r1.300 src/usr.bin/make/make.h
cvs rdiff -u -r1.668 -r1.669 src/usr.bin/make/parse.c
cvs rdiff -u -r1.311 -r1.312 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/deptgt-posix.exp \
    src/usr.bin/make/unit-tests/deptgt-posix.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index