This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does Makefile depend on version.c?


On Tue, 2003-07-22 at 12:12, Joseph S. Myers wrote:
> On Tue, 22 Jul 2003, Mark Mitchell wrote:
> 
> > It's hard for me to see why changing the version number requires these
> > things to be rebuilt.
> 
> It's used for the definition of libsubdir in the Makefile, and for the
> header in the generated manpages, but I suppose you're looking for
> something less obvious.

Let me ask it a different way.  

In Makefile.in we have:

gcc_version=@gcc_version@
gcc_version_trigger=@gcc_version_trigger@
version=$(gcc_version)
mainversion=`grep version_string $(srcdir)/version.c | sed -e
's/.*\"\([0-9]*\.[0-9]*\).*/\1/'`

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?

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]