Commit db5b4110 by H.J. Lu Committed by H.J. Lu

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
parent d9ce4316
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
......
......@@ -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) \
......
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment