Merged heads jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 22 Mar 2013 09:19:55 +0000
branchjv
changeset 18038 cb89906f69f9
parent 18037 4cf874da38c9 (current diff)
parent 18036 36519c4dedb5 (diff)
child 18039 09806667c605
Merged heads
ProjectDefinition.st
--- a/ProjectDefinition.st	Fri Mar 22 09:18:54 2013 +0000
+++ b/ProjectDefinition.st	Fri Mar 22 09:19:55 2013 +0000
@@ -90,7 +90,6 @@
 "
 ! !
 
-
 !ProjectDefinition class methodsFor:'instance creation'!
 
 definitionClassForMonticelloPackage:aMonicelloPackagename
@@ -224,7 +223,6 @@
     "Modified: / 17-08-2006 / 17:24:23 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'accessing'!
 
 directory
@@ -1000,7 +998,6 @@
     "Modified: / 08-08-2011 / 14:59:45 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'class initialization'!
 
 initialize
@@ -1122,7 +1119,6 @@
     "Modified: / 20-08-2011 / 23:32:32 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'code generation'!
 
 applicationIconFileName_code
@@ -1573,8 +1569,6 @@
     "Modified: / 09-10-2006 / 14:27:20 / cg"
 !
 
-
-
 productInstallDirBaseName_code
     ^ String streamContents:[:s |
         s nextPutLine:'productInstallDirBaseName'.
@@ -1764,7 +1758,6 @@
     "Created: / 23-08-2006 / 14:27:32 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'description'!
 
 excludedFromPreRequisites
@@ -1880,7 +1873,6 @@
     "Modified: / 17-08-2006 / 19:57:46 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'description - actions'!
 
 postLoadAction
@@ -1944,7 +1936,6 @@
     "Created: / 23-01-2007 / 19:08:27 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'description - compilation'!
 
 additionalBaseAddressDefinition_bc_dot_mak
@@ -2761,7 +2752,6 @@
     "Modified: / 17-08-2006 / 19:46:29 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'file generation'!
 
 apspecFilename
@@ -3269,7 +3259,6 @@
     "Created: / 07-09-2006 / 17:07:00 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'file mappings'!
 
 autopackage_default_dot_apspec_mappings
@@ -3557,7 +3546,6 @@
                 replaceAny:':' with:$_
 ! !
 
-
 !ProjectDefinition class methodsFor:'file mappings support'!
 
 classNamesByCategory
@@ -4262,7 +4250,6 @@
     ^ self subProjectMakeCallsUsing:'call vcmake %1 %2'.
 ! !
 
-
 !ProjectDefinition class methodsFor:'file templates'!
 
 autopackage_default_dot_apspec
@@ -4574,12 +4561,13 @@
 @pushd %(TOP)\rules
 @call find_mingw.bat
 @popd
-make.exe -N -f bc.mak %%USEMINGW_ARG%% %%*
+make.exe -N -f bc.mak %DEFINES% %%USEMINGW_ARG%% %%*
 
 %(SUBPROJECT_MINGWMAKE_CALLS)
 '
 
     "Created: / 05-09-2012 / 19:44:51 / cg"
+    "Modified: / 19-03-2013 / 08:54:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 objectLine_make_dot_spec
@@ -4701,7 +4689,6 @@
     "Modified: / 04-09-2012 / 11:45:49 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'loading'!
 
 ensureFullyLoaded
@@ -4768,71 +4755,76 @@
         ^ false
     ].
 
-    newStuffHasBeenLoaded := false.
-
-    (self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[
-        "/ thisContext fullPrintAll.
-        Transcript showCR:('loading %1%2...'
-                            bindWith:(asAutoloaded ifTrue:['as autoloaded '] ifFalse:[''])
-                            with:self name).
+    [
+        PackagesBeingLoaded add:self package.
+
+        newStuffHasBeenLoaded := false.
+
+        (self infoPrinting and:[Smalltalk silentLoading not]) ifTrue:[
+            "/ thisContext fullPrintAll.
+            Transcript showCR:('loading %1%2...'
+                                bindWith:(asAutoloaded ifTrue:['as autoloaded '] ifFalse:[''])
+                                with:self name).
+        ].
+
+        self rememberOverwrittenExtensionMethods.
+
+        self activityNotification:'Executing pre-load action'.
+        self executeHooks: #preLoad.
+        self preLoadAction.
+
+        meOrMySecondIncarnation := self.
+
+        Class withoutUpdatingChangesDo:[
+            self activityNotification:'Loading prerequisities'.
+            self loadPreRequisitesAsAutoloaded:asAutoloaded.
+
+            self checkPrerequisitesForLoading.
+
+            asAutoloaded ifFalse:[
+                self loadClassLibrary.
+                "/ could have overloaded my first incarnation
+                meOrMySecondIncarnation := (Smalltalk at:(self name)) ? self.
+                meOrMySecondIncarnation ~~ self ifTrue:[
+                    meOrMySecondIncarnation fetchSlotsFrom:self.
+                ].
+            ].
+
+            self hasAllExtensionsLoaded ifFalse:[
+                self activityNotification:'Loading extensions'.
+                newStuffHasBeenLoaded := newStuffHasBeenLoaded | meOrMySecondIncarnation loadExtensions.
+            ].
+            self hasAllClassesLoaded ifFalse:[
+                self activityNotification:'Loading classes'.
+                newStuffHasBeenLoaded := newStuffHasBeenLoaded | (meOrMySecondIncarnation loadAllClassesAsAutoloaded:asAutoloaded).
+            ].
+     "/ no, don't load subProjects here - will lead to a recursion, which leads
+     "/ to some classes being loaded from source (soap)
+            self activityNotification:'Loading sub projects'.
+            meOrMySecondIncarnation loadSubProjectsAsAutoloaded:asAutoloaded.
+        ].
+        self activityNotification:('Executing post-load action for %1' bindWith:self package).
+
+        "/ mhmh - already done for dll-loaded packages
+        "/ meOrMySecondIncarnation initializeAllClasses.
+        meOrMySecondIncarnation postLoadAction.
+        meOrMySecondIncarnation executeHooks: #postLoad.
+
+        meOrMySecondIncarnation projectIsLoaded:true.
+        meOrMySecondIncarnation ~~ self ifTrue:[
+            self projectIsLoaded:true.
+        ].
+
+        self activityNotification:('Done (%1).' bindWith:self package).
+    ] ensure: [
+        PackagesBeingLoaded remove:self package ifAbsent:[]
     ].
-
-    self rememberOverwrittenExtensionMethods.
-
-    self activityNotification:'Executing pre-load action'.
-    self executeHooks: #preLoad.
-    self preLoadAction.
-
-    meOrMySecondIncarnation := self.
-
-    Class withoutUpdatingChangesDo:[
-        self activityNotification:'Loading prerequisities'.
-        self loadPreRequisitesAsAutoloaded:asAutoloaded.
-
-        self checkPrerequisitesForLoading.
-
-        asAutoloaded ifFalse:[
-            self loadClassLibrary.
-            "/ could have overloaded my first incarnation
-            meOrMySecondIncarnation := (Smalltalk at:(self name)) ? self.
-            meOrMySecondIncarnation ~~ self ifTrue:[
-                meOrMySecondIncarnation fetchSlotsFrom:self.
-            ].
-        ].
-
-        self hasAllExtensionsLoaded ifFalse:[
-            self activityNotification:'Loading extensions'.
-            newStuffHasBeenLoaded := newStuffHasBeenLoaded | meOrMySecondIncarnation loadExtensions.
-        ].
-        self hasAllClassesLoaded ifFalse:[
-            self activityNotification:'Loading classes'.
-            newStuffHasBeenLoaded := newStuffHasBeenLoaded | (meOrMySecondIncarnation loadAllClassesAsAutoloaded:asAutoloaded).
-        ].
-"/ no, don't load subProjects here - will lead to a recursion, which leads
-"/ to some classes being loaded from source (soap)
-        self activityNotification:'Loading sub projects'.
-        meOrMySecondIncarnation loadSubProjectsAsAutoloaded:asAutoloaded.
-    ].
-    self activityNotification:('Executing post-load action for %1' bindWith:self package).
-
-    "/ mhmh - already done for dll-loaded packages
-    "/ meOrMySecondIncarnation initializeAllClasses.
-    meOrMySecondIncarnation postLoadAction.
-    meOrMySecondIncarnation executeHooks: #postLoad.
-
-    meOrMySecondIncarnation projectIsLoaded:true.
-    meOrMySecondIncarnation ~~ self ifTrue:[
-        self projectIsLoaded:true.
-    ].
-
-    self activityNotification:('Done (%1).' bindWith:self package).
     ^ newStuffHasBeenLoaded
 
     "Created: / 17-08-2006 / 01:01:41 / cg"
     "Modified: / 30-10-2008 / 08:16:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
-    "Modified: / 22-08-2009 / 12:02:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 04-09-2011 / 10:01:53 / cg"
-    "Modified: / 20-11-2012 / 23:06:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 21-03-2013 / 09:21:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 unloadPackage
@@ -4868,7 +4860,6 @@
     "Modified: / 20-11-2012 / 23:06:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !ProjectDefinition class methodsFor:'misc ui support'!
 
 iconInBrowserSymbol
@@ -4883,7 +4874,6 @@
     ^ super iconInBrowserSymbol
 ! !
 
-
 !ProjectDefinition class methodsFor:'private'!
 
 abbrevs
@@ -4937,10 +4927,15 @@
      test resources, as they are not neccessary for the package
      and should not be compiled (because of unwanted dependency
      on stx:goodies/sunit package)
-    "
-
-    (aClass inheritsFrom: TestCase) ifTrue:[^#(autoload)].
-    (aClass inheritsFrom: TestResource) ifTrue:[^#(autoload)].
+
+     But not make them autoloaded when the package is separate
+     test-package - by conventions such package should by named
+     #'module:package/subpackage/tests'    
+    "
+    ((self package endsWith: '/tests') or:[(self package endsWith: '/tests')]) ifFalse:[
+        (aClass inheritsFrom: TestCase) ifTrue:[^#(autoload)].
+        (aClass inheritsFrom: TestResource) ifTrue:[^#(autoload)].
+    ].
 
     "No additional attributes"
     ^#()
@@ -4956,6 +4951,7 @@
     "
 
     "Created: / 26-10-2009 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 20-03-2013 / 19:33:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 checkIfClassesArePresent
@@ -5487,7 +5483,6 @@
     "Created: / 03-06-2011 / 17:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !ProjectDefinition class methodsFor:'private-extension handling'!
 
 hasSavedOverwrittenMethods
@@ -5602,7 +5597,6 @@
     ^ safeForOverwrittenMethods at:(aClass name,'>>',aSelector) ifAbsent:nil
 ! !
 
-
 !ProjectDefinition class methodsFor:'private-loading'!
 
 checkPrerequisitesForLoading
@@ -5923,19 +5917,13 @@
 
             cls := self definitionClassForPackage:eachPackageID.
             (cls isNil or:[cls isLoaded not or:[cls projectIsLoaded not]]) ifTrue:[                        
-                (PackagesBeingLoaded includes:eachPackageID) ifFalse:[
-                    PackagesBeingLoaded add:eachPackageID.
-                    [
-                        Smalltalk loadPackage:eachPackageID asAutoloaded:asAutoloaded.
-                    ] ensure:[
-                        PackagesBeingLoaded remove:eachPackageID ifAbsent:[].
-                    ]
-                ]
+                Smalltalk loadPackage:eachPackageID asAutoloaded:asAutoloaded.
             ]
         ].
     ].
 
     "Modified: / 09-12-2010 / 12:36:17 / cg"
+    "Modified: / 21-03-2013 / 09:22:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 loadPreRequisitesAsAutoloaded:asAutoloaded
@@ -6137,7 +6125,6 @@
     ]
 ! !
 
-
 !ProjectDefinition class methodsFor:'private-prerequisites'!
 
 addReferencesToClassesFromGlobalsIn:aSetOfClasses to:usedClassReasons
@@ -6363,8 +6350,6 @@
     "Modified (comment): / 13-03-2013 / 00:40:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
-
-
 allReferences
     "answer all (recursive) projects to which I refer - in random order."
 
@@ -6542,7 +6527,6 @@
     "Created: / 06-09-2011 / 08:29:37 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'queries'!
 
 allClassNames
@@ -6913,7 +6897,6 @@
     ^ self subclassResponsibility
 ! !
 
-
 !ProjectDefinition class methodsFor:'queries-privacy'!
 
 showClassDocumentationOf:aClass
@@ -6927,7 +6910,6 @@
     "Created: / 05-11-2007 / 16:44:16 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'sanity checks'!
 
 validateDescription
@@ -7085,7 +7067,6 @@
     "Created: / 05-03-2012 / 12:18:45 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'testing'!
 
 isApplicationDefinition
@@ -7123,7 +7104,6 @@
     "Modified: / 08-02-2011 / 10:03:49 / cg"
 ! !
 
-
 !ProjectDefinition::AbbrevEntry methodsFor:'accessing'!
 
 category
@@ -7153,7 +7133,6 @@
     "Created: / 18-08-2011 / 14:18:37 / cg"
 ! !
 
-
 !ProjectDefinition class methodsFor:'documentation'!
 
 version