From e72c5e021ff3e9dec34c078a1a76a260fc562b90 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Mon, 17 Jan 2022 18:23:42 -0500 Subject: [SV 61226] Revert changes to detect missing included files The fix for SV 60595 introduced a backward-incompatibility: rules that purported to rebuild included files, but didn't actually do so, were treated as errors whereas before they were ignored. This breaks a common idiom in makefiles where an empty recipe is created for an included makefile so make doesn't complain if it doesn't exist. Unfortunately this means make cannot diagnose some types of errors. Extra tests supplied by Dmitry Goncharov . * doc/make.texi (Including Other Makefiles): Clarify this behavior. * src/main.c (main): Don't run the new check-for-errors behavior. * tests/scripts/features/reinvoke: Reset tests of the "old" behavior and add new tests for this situation. --- doc/make.texi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/make.texi b/doc/make.texi index e555373a..896ca0cd 100644 --- a/doc/make.texi +++ b/doc/make.texi @@ -1301,13 +1301,13 @@ command line option @code{-I} with the special value @code{-} (e.g., forget any already-set include directories, including the default directories. -If an included makefile cannot be found in any of these directories it -is not an immediately fatal error; processing of the makefile -containing the @code{include} continues. Once it has finished reading -makefiles, @code{make} will try to remake any that are out of date or -don't exist. @xref{Remaking Makefiles, ,How Makefiles Are Remade}. -Only after it has tried to find a way to remake a makefile and failed, -will @code{make} diagnose the missing makefile as a fatal error. +If an included makefile cannot be found in any of these directories it is not +an immediately fatal error; processing of the makefile containing the +@code{include} continues. Once it has finished reading makefiles, @code{make} +will try to remake any that are out of date or don't exist. @xref{Remaking +Makefiles, ,How Makefiles Are Remade}. Only after it has failed to find a +rule to remake the makefile, or it found a rule but the recipe failed, will +@code{make} diagnose the missing makefile as a fatal error. If you want @code{make} to simply ignore a makefile which does not exist or cannot be remade, with no error message, use the @w{@code{-include}} -- cgit v1.2.1