svnRevisionNr is updated only if it differs from previous build jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sat, 07 May 2011 14:12:06 +0100
branchjv
changeset 17838 d321a40afe36
parent 17837 5fe1a95a4032
child 17839 945a99abe2bd
svnRevisionNr is updated only if it differs from previous build
Make.proto
ProjectDefinition.st
--- a/Make.proto	Thu May 05 13:37:48 2011 +0100
+++ b/Make.proto	Sat May 07 14:12:06 2011 +0100
@@ -1,4 +1,4 @@
-# $Header: /var/local/cvs/stx/libbasic/Make.proto,v 1.236 2011-02-09 10:45:55 cg Exp $
+# $Header$
 #
 # DO NOT EDIT
 # automagically generated from the projectDefinition: stx_libbasic.
@@ -68,8 +68,11 @@
 
 
 update-svn-revision:
-	sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"'$(shell svnversion -n)'\"\$$\"/g" \
-		stx_libbasic.st
+	if [ ! -r .svnversion -o "$(shell svnversion -n)" != "$(shell cat .svnversion)" ]; then \
+		svnversion -n > .svnversion; \
+		sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"'$(shell svnversion -n)'\"\$$\"/g" \
+			stx_libbasic.st; \
+	fi
 .PHONY: update-svn-revision
 
 
@@ -394,5 +397,3 @@
 
 # ENDMAKEDEPEND --- do not remove this line
 
-
-
--- a/ProjectDefinition.st	Thu May 05 13:37:48 2011 +0100
+++ b/ProjectDefinition.st	Sat May 07 14:12:06 2011 +0100
@@ -1946,11 +1946,15 @@
     ^ String streamContents:
         [:s|s
         nextPutLine:'update-svn-revision:';
-        tab; nextPutLine: 'sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"''$(shell svnversion -n)''\"\$$\"/g" \';
-        tab; tab; nextPutLine: (self name , '.st');
+        tab; nextPutLine: 'if [ !! -r .svnversion -o "$(shell svnversion -n)" !!= "$(shell cat .svnversion)" ]; then \';
+        tab; tab; nextPutLine: 'svnversion -n > .svnversion; \';
+        tab; tab; nextPutLine: 'sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"''$(shell svnversion -n)''\"\$$\"/g" \';
+        tab; tab; tab; nextPutLine: (self name , '.st; \');
+        tab; nextPutLine: 'fi';
         nextPutLine: '.PHONY: update-svn-revision']
 
     "Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
+    "Modified: / 07-05-2011 / 13:49:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 additionalRules_bc_dot_mak
@@ -6125,7 +6129,7 @@
 !ProjectDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ProjectDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10638 2011-05-07 13:12:06Z vranyj1 $'
 !
 
 version_CVS
@@ -6133,8 +6137,7 @@
 !
 
 version_SVN
-    ^ '$Id: ProjectDefinition.st 10632 2011-04-09 17:19:04Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10638 2011-05-07 13:12:06Z vranyj1 $'
 ! !
 
 ProjectDefinition initialize!
-