One version number, &c, take two

Mark Mitchell mark@codesourcery.com
Wed Mar 9 08:06:00 GMT 2005


Zack Weinberg wrote:
> This is a revised version of my patch to consolidate version number
> handling further, streamline the release process a little, and avoid
> re-running configure when the datestamp changes.  The patch adds three
> files in the toplevel config/ directory.  GCC-BASE-VER contains the
> base version number of the compiler.  DATESTAMP contains the tree
> datestamp in the usual YYYYMMDD format; it is empty in a release
> tarball.  GCC-DEV-PHASE contains the word "experimental" on
> development branches, "prerelease" on release branches, and is empty
> in releases.  All three files are syntax-free.

Very cool.

>  - configure.ac now looks at config/GCC-DEV-PHASE to determine whether
>    is_release should be true.  It is therefore no longer necessary to
>    modify configure.ac and regenerate configure when making a release branch.

Great!

> @@ -1547,7 +1564,12 @@ options.o: options.c options.h opts.h in
>  
>  dumpvers: dumpvers.c
>  
> -version.o: version.c version.h
> +# The space between the comma and the $(shell cat $(DATESTAMP)) below
> +# is significant.  Do not reformat that line.
> +version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
> +	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
> +	-DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \
> +	-DDEVPHASE=$(DEVPHASE_s) -c $(srcdir)/version.c $(OUTPUT_OPTION)

Umm, there is no $(shell cat $(DATESTAMP)) here.

I like this patch a lot!

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304



More information about the Libstdc++ mailing list