aboutsummaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2007-08-16 21:10:14 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2007-08-16 14:10:14 -0700
commitdb5b41105b6b13d00926ab8db7893ceba5d92eb4 (patch)
treecfad22df9c02fdcb36dace4f1fbaccc09dbf13c7 /gcc/Makefile.in
parentd9ce43168e75ba072e3261a989353a58361099f4 (diff)
downloadgcc-db5b41105b6b13d00926ab8db7893ceba5d92eb4.zip
gcc-db5b41105b6b13d00926ab8db7893ceba5d92eb4.tar.gz
gcc-db5b41105b6b13d00926ab8db7893ceba5d92eb4.tar.bz2
Makefile.in (REVISION): New.
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. From-SVN: r127568
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 758a4ae..18cc5c8 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) \