From: Jakub Jelinek Date: Mon, 4 May 2015 10:39:16 +0000 (+0200) Subject: Makefile.in (PATCHLEVEL_c): New variable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6c014db508f18416e5863907db1b628acfe021b;p=gcc.git Makefile.in (PATCHLEVEL_c): New variable. * Makefile.in (PATCHLEVEL_c): New variable. (DATESTAMP_s, REVISION_s): If PATCHLEVEL_c is not 0, expand the same way as if DEVPHASE_c was non-empty. From-SVN: r222762 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aceb1c321a9..c751ea7ed6c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-04 Jakub Jelinek + + * Makefile.in (PATCHLEVEL_c): New variable. + (DATESTAMP_s, REVISION_s): If PATCHLEVEL_c is not 0, + expand the same way as if DEVPHASE_c was non-empty. + 2015-05-04 Kai Tietz PR target/65559 diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 20a34a1408e..652b3e71d39 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -828,14 +828,20 @@ endif version := $(BASEVER_c) +PATCHLEVEL_c := \ + $(shell echo $(BASEVER_c) | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$$/\1/') + + # For use in version.c - double quoted strings, with appropriate # surrounding punctuation and spaces, and with the datestamp and # development phase collapsed to the empty string in release mode -# (i.e. if DEVPHASE_c is empty). The space immediately after the -# comma in the $(if ...) constructs is significant - do not remove it. +# (i.e. if DEVPHASE_c is empty and PATCHLEVEL_c is 0). The space +# immediately after the comma in the $(if ...) constructs is +# significant - do not remove it. BASEVER_s := "\"$(BASEVER_c)\"" DEVPHASE_s := "\"$(if $(DEVPHASE_c), ($(DEVPHASE_c)))\"" -DATESTAMP_s := "\"$(if $(DEVPHASE_c), $(DATESTAMP_c))\"" +DATESTAMP_s := \ + "\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(DATESTAMP_c))\"" PKGVERSION_s:= "\"@PKGVERSION@\"" BUGURL_s := "\"@REPORT_BUGS_TO@\"" @@ -843,7 +849,8 @@ PKGVERSION := @PKGVERSION@ BUGURL_TEXI := @REPORT_BUGS_TEXI@ ifdef REVISION_c -REVISION_s := "\"$(if $(DEVPHASE_c), $(REVISION_c))\"" +REVISION_s := \ + "\"$(if $(DEVPHASE_c)$(filter-out 0,$(PATCHLEVEL_c)), $(REVISION_c))\"" else REVISION_s := "\"\"" endif