Added makefile rules for Mercurial jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 28 Nov 2012 10:22:05 +0000
branchjv
changeset 17992 797f12be31a0
parent 17991 58b6c0fd8b2a
child 17993 956342c369a2
Added makefile rules for Mercurial
ApplicationDefinition.st
LibraryDefinition.st
ProjectDefinition.st
--- a/ApplicationDefinition.st	Tue Nov 27 16:16:51 2012 +0000
+++ b/ApplicationDefinition.st	Wed Nov 28 10:22:05 2012 +0000
@@ -1808,6 +1808,8 @@
 
 %(ADDITIONAL_RULES)
 
+%(ADDITIONAL_RULES_HG)
+
 %(ADDITIONAL_HEADERRULES)
 
 clean::
@@ -1840,6 +1842,7 @@
 '.
 
     "Modified: / 28-09-2012 / 18:30:15 / cg"
+    "Modified: / 28-11-2012 / 10:18:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 bc_dot_mak_app_source_rules
@@ -2247,6 +2250,8 @@
 
 %(ADDITIONAL_RULES_SVN)
 
+%(ADDITIONAL_RULES_HG)
+
 %(ADDITIONAL_HEADERRULES)
 
 clean::
@@ -2264,6 +2269,7 @@
     "Created: / 29-09-2006 / 23:47:07 / cg"
     "Modified: / 24-06-2009 / 21:40:26 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 26-07-2012 / 00:57:07 / cg"
+    "Modified: / 28-11-2012 / 10:18:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 make_dot_proto_app_source_rules
@@ -2898,7 +2904,7 @@
 !ApplicationDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ApplicationDefinition.st,v 1.207 2012/10/12 10:36:21 sr Exp $'
+    ^ '$Id: ApplicationDefinition.st 10875 2012-11-28 10:22:05Z vranyj1 $'
 !
 
 version_CVS
@@ -2906,5 +2912,5 @@
 !
 
 version_SVN
-    ^ '$ Id: ApplicationDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  $'
+    ^ '$Id:: ApplicationDefinition.st 10875 2012-11-28 10:22:05Z vranyj1                                                            $'
 ! !
--- a/LibraryDefinition.st	Tue Nov 27 16:16:51 2012 +0000
+++ b/LibraryDefinition.st	Wed Nov 28 10:22:05 2012 +0000
@@ -322,6 +322,9 @@
 %(MAKE_PREREQUISITES)
 
 %(ADDITIONAL_RULES)
+
+%(ADDITIONAL_RULES_HG)
+
 %(ADDITIONAL_HEADERRULES)
 
 test: $(TOP)\goodies\builder\reports\NUL
@@ -336,7 +339,7 @@
     "Created: / 09-08-2006 / 11:44:20 / fm"
     "Modified: / 09-08-2006 / 19:59:32 / fm"
     "Modified: / 26-07-2012 / 00:57:20 / cg"
-    "Modified: / 23-11-2012 / 20:25:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 28-11-2012 / 10:18:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 extensionLine_libInit_dot_cc
@@ -464,6 +467,8 @@
 
 %(ADDITIONAL_RULES_SVN)
 
+%(ADDITIONAL_RULES_HG)
+
 %(ADDITIONAL_HEADERRULES)
 
 # run default testsuite for this package
@@ -528,7 +533,7 @@
     "Modified: / 09-08-2006 / 16:50:23 / fm"
     "Modified: / 24-06-2009 / 21:39:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 26-07-2012 / 00:57:29 / cg"
-    "Modified: / 23-11-2012 / 20:24:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 28-11-2012 / 10:19:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 vc_dot_def
@@ -715,7 +720,7 @@
 !LibraryDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Id: LibraryDefinition.st 10870 2012-11-23 20:26:31Z vranyj1 $'
+    ^ '$Id: LibraryDefinition.st 10875 2012-11-28 10:22:05Z vranyj1 $'
 !
 
 version_CVS
@@ -723,5 +728,5 @@
 !
 
 version_SVN
-    ^ '$Id: LibraryDefinition.st 10870 2012-11-23 20:26:31Z vranyj1 $'
+    ^ '$Id: LibraryDefinition.st 10875 2012-11-28 10:22:05Z vranyj1 $'
 ! !
--- a/ProjectDefinition.st	Tue Nov 27 16:16:51 2012 +0000
+++ b/ProjectDefinition.st	Wed Nov 28 10:22:05 2012 +0000
@@ -1970,6 +1970,7 @@
     "Modified: / 17-08-2006 / 19:59:26 / cg"
 ! !
 
+
 !ProjectDefinition class methodsFor:'description - classes'!
 
 additionalClassNamesAndAttributes
@@ -2122,12 +2123,46 @@
     "Created: / 22-08-2006 / 23:53:33 / cg"
 !
 
+additionalRulesHG_bc_dot_mak
+
+    (self class includesSelector: #version_HG) ifFalse:[^''].
+
+    ^'
+' bindWith: self name.
+
+    "
+        stx_libscm_mercurial additionalRulesHG_bc_dot_mak
+    "
+
+    "Created: / 28-11-2012 / 10:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+additionalRulesHG_make_dot_proto
+
+    (self class includesSelector: #version_HG) ifFalse:[^''].
+
+    ^'
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo ''**NOHG**''))
+%1.$(OBJ): $(shell hg root)/.hg/dirstate
+endif
+' bindWith: self name.
+
+    "
+        stx_libscm_mercurial additionalRulesHG_make_dot_proto
+    "
+
+    "Created: / 28-11-2012 / 10:12:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 additionalRulesSvn_make_dot_proto
 
     (self class includesSelector: #svnRevisionNr) ifFalse:[^''].
 
     ^'
-# Update SVN revision in stx_libbasic3.st
+# Update SVN revision in package definition class
 ifneq (,$(findstring .svn,$(wildcard .svn)))
 .svnversion: *.st
         if [ -d .svn ]; then \
@@ -2155,7 +2190,7 @@
     "
 
     "Created: / 24-06-2009 / 21:33:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
-    "Modified: / 31-07-2012 / 17:03:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 28-11-2012 / 10:12:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 additionalRules_bc_dot_mak
@@ -3320,6 +3355,7 @@
         at: 'ADDITIONAL_DEFINITIONS' put: (self additionalDefinitions_bc_dot_mak ? '');
         at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_bc_dot_mak);
         at: 'ADDITIONAL_RULES' put: (self additionalRules_bc_dot_mak ? '');
+        at: 'ADDITIONAL_RULES_HG' put: (self additionalRulesHG_bc_dot_mak ? '');
         at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_bc_dot_mak ? '');
         at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_bc_dot_mak ? '');
         at: 'LOCAL_INCLUDES' put: (self generateLocalIncludes_win32 ? '');
@@ -3330,6 +3366,7 @@
 
     "Created: / 18-08-2006 / 11:43:39 / cg"
     "Modified: / 05-09-2012 / 10:02:51 / cg"
+    "Modified: / 28-11-2012 / 10:15:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 bmake_dot_mak_mappings
@@ -3417,6 +3454,7 @@
         at: 'ADDITIONAL_HEADERRULES' put: (self additionalHeaderRules_make_dot_proto);
         at: 'ADDITIONAL_RULES' put: (self additionalRules_make_dot_proto);
         at: 'ADDITIONAL_RULES_SVN' put: (self additionalRulesSvn_make_dot_proto);
+        at: 'ADDITIONAL_RULES_HG' put: (self additionalRulesHG_make_dot_proto);
         at: 'ADDITIONAL_TARGETS' put: (self additionalTargets_make_dot_proto);
         at: 'ADDITIONAL_TARGETS_SVN' put: (self additionalTargetsSvn_make_dot_proto);
         at: 'ADDITIONAL_LINK_LIBRARIES' put: (self additionalLinkLibraries_make_dot_proto);
@@ -3428,8 +3466,8 @@
     "Created: / 09-08-2006 / 11:20:45 / fm"
     "Modified: / 09-08-2006 / 16:44:48 / fm"
     "Modified: / 24-06-2009 / 21:50:13 / Jan Vrany <vranyj1@fel.cvut.cz>"
-    "Modified: / 22-08-2009 / 12:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 05-09-2012 / 10:10:40 / cg"
+    "Modified: / 28-11-2012 / 10:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 make_dot_spec_mappings
@@ -6888,7 +6926,7 @@
 !ProjectDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ProjectDefinition.st 10874 2012-11-27 16:16:51Z vranyj1 $'
+    ^ '$Id: ProjectDefinition.st 10875 2012-11-28 10:22:05Z vranyj1 $'
 !
 
 version_CVS
@@ -6896,7 +6934,7 @@
 !
 
 version_SVN
-    ^ '$Id:: ProjectDefinition.st 10874 2012-11-27 16:16:51Z vranyj1                                                                $'
+    ^ '$Id:: ProjectDefinition.st 10875 2012-11-28 10:22:05Z vranyj1                                                                $'
 ! !
 
 ProjectDefinition initialize!