]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Makefile.in (PATCHLEVEL_c): New variable.
authorJakub Jelinek <jakub@redhat.com>
Mon, 4 May 2015 10:39:16 +0000 (12:39 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 4 May 2015 10:39:16 +0000 (12:39 +0200)
* 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

gcc/ChangeLog
gcc/Makefile.in

index aceb1c321a9884793eca02015240d7465559a125..c751ea7ed6c014113f7f59fca403c0697a97a453 100644 (file)
@@ -1,3 +1,9 @@
+2015-05-04  Jakub Jelinek  <jakub@redhat.com>
+
+       * 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  <ktietz@redhat.com>
 
        PR target/65559
index 20a34a1408e985ae146ff5d4b9c66a35601cf3ec..652b3e71d39a0e31904f85d24dbbbce3db3ee8e7 100644 (file)
@@ -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