Why does Makefile depend on version.c?

Joseph S. Myers jsm@polyomino.org.uk
Tue Jul 22 21:40:00 GMT 2003


On Tue, 22 Jul 2003, Mark Mitchell wrote:

> Since we are willing to set Make variables based on shell commands that
> look at version.c, why have configure actually substitute gcc_version? 
> Right now, configure reads version.c and then does AC_SUBST into
> gcc_version.  That means that an update that brings in a new version.c
> causes a Makefile rebuild, which seems pointless.  By just having the
> Makefile read the file we could avoid that.
> 
> Does that sound OK to you?

That seems reasonable (and we may be able to get rid of some unused
Makefile variables for the version if not all of them are used any more).  
Properly everything that uses the version number should have its own
dependency on version.c, but make isn't good at handling such cases where
the dependency is really on only a small part of the file.

-- 
Joseph S. Myers
jsm@polyomino.org.uk



More information about the Gcc mailing list