diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-16 21:10:14 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-08-16 21:10:14 +0000 |
commit | a2b17a85ff5fcf62e35fe61c963910119f51ac69 (patch) | |
tree | cfad22df9c02fdcb36dace4f1fbaccc09dbf13c7 | |
parent | 068f40295c3c2ba63eb76bb3e589978da09d8842 (diff) | |
download | gcc-a2b17a85ff5fcf62e35fe61c963910119f51ac69.tar.gz |
2007-08-16 H.J. Lu <hongjiu.lu@intel.com>
* Makefile.in (REVISION): New.
(REVISION_c): New.
(REVISION_s): New.
(version.o): Also depend on $(REVISION). Add
-DREVISION=$(REVISION_s).
* version.c (version_string): Add REVISION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127568 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/Makefile.in | 16 | ||||
-rw-r--r-- | gcc/version.c | 5 |
3 files changed, 28 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6f8ed5a2a85..f027d79452a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2007-08-16 H.J. Lu <hongjiu.lu@intel.com> + + * Makefile.in (REVISION): New. + (REVISION_c): New. + (REVISION_s): New. + (version.o): Also depend on $(REVISION). Add + -DREVISION=$(REVISION_s). + + * version.c (version_string): Add REVISION. + 2007-08-16 Seongbae Park <seongbae.park@gmail.com> * tree-eh.c (lower_try_finally_onedest): Reset the locus diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 758a4aeca2a..18cc5c80dd4 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -728,11 +728,18 @@ TM_H = $(GTM_H) insn-constants.h insn-flags.h options.h BASEVER := $(srcdir)/BASE-VER # 4.x.y DEVPHASE := $(srcdir)/DEV-PHASE # experimental, prerelease, "" DATESTAMP := $(srcdir)/DATESTAMP # YYYYMMDD or empty +REVISION := $(srcdir)/REVISION # [BRANCH revision XXXXXX] BASEVER_c := $(shell cat $(BASEVER)) DEVPHASE_c := $(shell cat $(DEVPHASE)) DATESTAMP_c := $(shell cat $(DATESTAMP)) +ifeq (,$(wildcard $(REVISION))) +REVISION_c := +else +REVISION_c := $(shell cat $(REVISION)) +endif + version := $(BASEVER_c) # For use in version.c - double quoted strings, with appropriate @@ -744,6 +751,12 @@ BASEVER_s := "\"$(BASEVER_c)\"" DEVPHASE_s := "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\"" DATESTAMP_s := "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\"" +ifdef REVISION_c +REVISION_s := "\"$(if $(DEVPHASE_c), $(REVISION_c))\"" +else +REVISION_s := +endif + # Shorthand variables for dependency lists. TARGET_H = $(TM_H) target.h insn-modes.h MACHMODE_H = machmode.h mode-classes.def insn-modes.h @@ -1886,9 +1899,10 @@ gcc-options.o: options.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) opts.h intl dumpvers: dumpvers.c -version.o: version.c version.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) +version.o: version.c version.h $(REVISION) $(DATESTAMP) $(BASEVER) $(DEVPHASE) $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \ + -DREVISION=$(REVISION_s) \ -DDEVPHASE=$(DEVPHASE_s) -c $(srcdir)/version.c $(OUTPUT_OPTION) gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \ diff --git a/gcc/version.c b/gcc/version.c index c839cbd272d..762c4beea91 100644 --- a/gcc/version.c +++ b/gcc/version.c @@ -20,6 +20,7 @@ const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>"; /* The complete version string, assembled from several pieces. - BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */ + BASEVER, DATESTAMP, DEVPHASE, and REVISION are defined by the + Makefile. */ -const char version_string[] = BASEVER DATESTAMP DEVPHASE VERSUFFIX; +const char version_string[] = BASEVER DATESTAMP DEVPHASE VERSUFFIX REVISION; |