--- a/ProjectDefinition.st Mon Aug 21 14:03:43 2006 +0200
+++ b/ProjectDefinition.st Mon Aug 21 14:03:54 2006 +0200
@@ -19,6 +19,13 @@
category:'System-Support-Projects'
!
+ProjectDefinition class instanceVariableNames:'overwrittenMethods'
+
+"
+ No other class instance variables are inherited by this class.
+"
+!
+
!ProjectDefinition class methodsFor:'documentation'!
copyright
@@ -413,19 +420,22 @@
!ProjectDefinition class methodsFor:'description - classes'!
-autoloaded_classNames
- "classes listed here will NOT be compiled, but remain autoloaded.
- (i.e. excluded from the build process).
- A corresponding method is generated for real descriptions."
+allClassNames
+ ^ self classNamesForWhich:[:nm :attr | true ].
+!
+classNames
+ "a correponding method with real names is generated in my subclasses"
+
+self halt.
^ #()
"Created: / 07-08-2006 / 19:02:57 / fm"
"Modified: / 07-08-2006 / 21:25:25 / fm"
- "Modified: / 17-08-2006 / 20:47:59 / cg"
+ "Modified: / 17-08-2006 / 20:47:20 / cg"
!
-compiled_classNames
+classNamesAndAttributes
"a correponding method with real names is generated in my subclasses"
^ #()
@@ -435,10 +445,67 @@
"Modified: / 17-08-2006 / 20:47:20 / cg"
!
+classNamesForWhich:aBlock
+ "a correponding method with real names is generated in my subclasses"
+
+ |coll|
+
+ coll := OrderedCollection new.
+ self classNamesAndAttributesDo:[:nm :attributes |
+ (aBlock value:nm value:attributes) ifTrue:[
+ coll add:nm.
+ ].
+ ].
+ ^ coll
+
+ "Created: / 07-08-2006 / 19:02:57 / fm"
+ "Modified: / 07-08-2006 / 21:25:25 / fm"
+ "Modified: / 17-08-2006 / 20:47:20 / cg"
+!
+
+compiled_classNames
+ ^ self
+ classNamesForWhich:[:nm :attr |
+ (attr includes:#autoload) not
+ and:[(attr includes:#unix) not
+ and:[(attr includes:#win32) not ]]
+ ].
+
+ "Created: / 07-08-2006 / 19:02:57 / fm"
+ "Modified: / 07-08-2006 / 21:25:25 / fm"
+ "Modified: / 17-08-2006 / 20:47:20 / cg"
+!
+
+compiled_classNamesForArchitecture:architectureID
+ ^ self
+ classNamesForWhich:[:nm :attr |
+ (attr includes:#autoload) not
+ and:[(attr includes:architectureID)]
+ ].
+
+ "Created: / 07-08-2006 / 19:02:57 / fm"
+ "Modified: / 07-08-2006 / 21:25:25 / fm"
+ "Modified: / 17-08-2006 / 20:47:20 / cg"
+!
+
+compiled_classNames_common
+ "class, only to be compiled under unix"
+
+ ^ self
+ classNamesForWhich:[:nm :attr |
+ attr isEmptyOrNil
+ ].
+
+ "Created: / 18-08-2006 / 13:37:51 / cg"
+!
+
compiled_classNames_unix
"class, only to be compiled under unix"
- ^ #()
+ ^ self
+ classNamesForWhich:[:nm :attr |
+ attr includes:#unix
+ ].
"Created: / 18-08-2006 / 13:37:51 / cg"
!
@@ -446,22 +513,14 @@
compiled_classNames_windows
"class, only to be compiled under windows"
- ^ #()
+ ^ self
+ classNamesForWhich:[:nm :attr |
+ attr includes:#win32
+ ].
"Created: / 18-08-2006 / 13:37:56 / cg"
!
-excluded_classNames
- "list names of classes to be excluded from the build process.
- A correponding method with real names is generated in my subclasses"
-
- ^#()
-
- "Created: / 07-08-2006 / 19:02:57 / fm"
- "Modified: / 07-08-2006 / 21:25:25 / fm"
- "Modified: / 17-08-2006 / 20:49:24 / cg"
-!
-
extensionMethodNames
"list class/selector pairs of extensions.
A correponding method with real names is generated in my subclasses"
@@ -747,10 +806,6 @@
!ProjectDefinition class methodsFor:'file generation'!
-allClassNames
- ^ (self compiled_classNames , self autoloaded_classNames , self excluded_classNames)
-!
-
fileNamesToGenerate
self subclassResponsibility
!
@@ -804,6 +859,9 @@
filename = 'lib.rc' ifTrue:[
^ self generate_packageName_dot_rc
].
+ filename = 'abbrev.stc' ifTrue:[
+ ^ self generate_abbrev_dot_stc
+ ].
self halt.
"Modified: / 18-08-2006 / 13:06:04 / cg"
@@ -812,10 +870,7 @@
generate_abbrev_dot_stc
^ String
streamContents:[:s |
- (self allClassNames
- , self compiled_classNames_unix
- , self compiled_classNames_windows)
- do:[:eachClassName |
+ self allClassNames do:[:eachClassName |
|cls fn|
cls := Smalltalk classNamed:eachClassName.
@@ -1168,6 +1223,21 @@
!ProjectDefinition class methodsFor:'private'!
+classNamesAndAttributesDo: aBlock
+ self classNamesAndAttributes do:[:entry |
+ |className attributes|
+
+ entry isArray ifFalse:[
+ className := entry.
+ attributes := #().
+ ] ifTrue:[
+ className := entry first.
+ attributes := entry copyFrom:2.
+ ].
+ aBlock value: className value: attributes
+ ].
+!
+
compileDescriptionMethods
Class packageQuerySignal
answer:self package
@@ -1209,6 +1279,20 @@
"Modified: / 09-08-2006 / 18:02:28 / fm"
!
+compiled_classesForArchitecture:arch
+ ^ (self compiled_classNamesForArchitecture:arch) collect:[:eachName| (Smalltalk at:eachName asSymbol)]
+
+ "Created: / 09-08-2006 / 16:28:15 / fm"
+ "Modified: / 09-08-2006 / 18:02:28 / fm"
+!
+
+compiled_classes_common
+ ^ self compiled_classNames_common collect:[:eachName| (Smalltalk at:eachName asSymbol)]
+
+ "Created: / 09-08-2006 / 16:28:15 / fm"
+ "Modified: / 09-08-2006 / 18:02:28 / fm"
+!
+
cvsRevision
|rev|
@@ -1351,7 +1435,8 @@
class := Smalltalk classNamed:packageDefinitionClassName.
class isNil ifTrue:[
doCreateIfAbsent ifTrue:[
- ^ self newForPackage:aPackageID
+ class := self newForPackage:aPackageID.
+ class compileDescriptionMethods.
].
].
^ class
@@ -1522,5 +1607,5 @@
!ProjectDefinition class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.21 2006-08-21 08:07:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.22 2006-08-21 12:03:54 cg Exp $'
! !