[lug] OT: Makefile oddity

D. Stimits stimits at idcomm.com
Fri Apr 19 12:47:22 MDT 2002


Ken Weinert wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> This might be relevant:
> 
>    If an included makefile cannot be found in any of these directories,
> a warning message is generated, but it is not an immediately fatal
> error; processing of the makefile containing the `include' continues.
> Once it has finished reading makefiles, `make' will try to remake any
> that are out of date or don't exist.  *Note How Makefiles Are Remade:
> Remaking Makefiles.  Only after it has tried to find a way to remake a
> makefile and failed, will `make' diagnose the missing makefile as a
> fatal error.
> 
>    If you want `make' to simply ignore a makefile which does not exist
> and cannot be remade, with no error message, use the `-include'
> directive instead of `include', like this:
> 
>      -include FILENAMES...
> 
>    This is acts like `include' in every way except that there is no
> error (not even a warning) if any of the FILENAMES do not exist.  For
> compatibility with some other `make' implementations, `sinclude' is
> another name for `-include'.
> 
> The other thing I note (which might just be a typo) is that you said
> ${SOMETHING} - this should be $(SOMETHING) and might have something to do
> with make thinking the included makefile is out of date.
> 

Nope, it is finding the Makefiles. It is using macro values in those
files correctly, no error is being generated. Then it goes on to pretend
that Makefile.whatever *also* requires compiling. Very strange.

...

D. Stimits, stimits at idcomm.com



More information about the LUG mailing list