]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 60795] Don't remake phony included makefiles and show errors
authorPaul Smith <psmith@gnu.org>
Mon, 6 Sep 2021 21:47:04 +0000 (17:47 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 6 Sep 2021 22:49:08 +0000 (18:49 -0400)
commit0c2fc00544b89314643561dcb6d78f35eb98da68
treea3f66bbeef07911214a7594673a52f8a471e7f7d
parent214df0e92a49203ca96fc8ed28799994f8bc6cb3
[SV 60795] Don't remake phony included makefiles and show errors

Change the handling of included makefiles which are phony targets to
be similar to double-colon rules with no prerequisites: simply don't
build them at all during the remake a makefile phase.

Ensure that any included makefile which is needed but not built
results in an error.

Update the documentation to make this clear.
Add tests to verify this behavior.

* doc/make.texi (Remaking Makefiles): Clarify double-colon exception.
Document that phony targets are handled the same way.
(Phony Targets): Ditto.
* src/main.c (main): Check for phony targets when skipping goals.
Rather than throwing out skipped but failed goals keep them
separately then report them as errors.
* src/read.c (eval): Set the file location on included makefiles even
when there's no error.
* tests/scripts/features/include: Add tests for handling included
makefiles with both phony and double-colon rules to rebuild them.
doc/make.texi
src/main.c
src/read.c
tests/scripts/features/include