--- a/Project.st Sun Oct 03 16:37:37 1999 +0200
+++ b/Project.st Sun Oct 03 17:30:13 1999 +0200
@@ -968,8 +968,8 @@
module := pack at:'repository.module' ifAbsent:nil.
module notNil ifTrue:[
- repositoryModule := module.
- repositoryDirectory := pack at:'repository.directory' ifAbsent:''.
+ repositoryModule := module.
+ repositoryDirectory := pack at:'repository.directory' ifAbsent:''.
].
prerequisites := pack at:'prerequisites' ifAbsent:#().
@@ -977,42 +977,45 @@
s := pack at:'nameSpace' ifAbsent:nil.
s notNil ifTrue:[
- self defaultNameSpace:(Namespace name:s asSymbol).
+ self defaultNameSpace:(Namespace name:s asSymbol).
].
subProjects := pack at:'subProjects' ifAbsent:subProjects.
(s := pack at:'comment' ifAbsent:nil) notNil ifTrue:[
- self comment:s
+ self comment:s
].
"/ first, all of the conditions ...
targetConditions := Dictionary new.
pack keysAndValuesDo:[:key :val |
- |conditionKey|
-
- (key startsWith:'target.condition.') ifTrue:[
- conditionKey := key copyFrom:'target.condition.' size + 1.
- targetConditions at:conditionKey put:val.
- ]
+ |conditionKey|
+
+ (key startsWith:'target.condition.') ifTrue:[
+ conditionKey := key copyFrom:'target.condition.' size + 1.
+ targetConditions at:conditionKey put:val.
+ ]
].
properties isNil ifTrue:[
- properties := IdentityDictionary new
+ properties := IdentityDictionary new
].
properties at:#'targetconditions' put:targetConditions.
sourcesSubDir := pack at:'sources' ifAbsent:nil.
sourcesSubDir notNil ifTrue:[
- properties at:#'sourcesDirectory' put:sourcesSubDir.
+ properties at:#'sourcesDirectory' put:sourcesSubDir.
].
- methodsFile := pack at:'methodsFile' ifAbsent:nil.
- methodsFile size > 0 ifTrue:[
- properties at:#'methodsFile' put:methodsFile.
- ].
- files := pack at:'files' ifAbsent:nil.
- files notNil ifTrue:[
- properties at:#'files' put:files.
- ].
+"/ methodsFile := pack at:'methodsFile' ifAbsent:nil.
+"/ methodsFile size > 0 ifTrue:[
+"/ properties at:#'methodsFile' put:methodsFile.
+"/ ].
+ properties declare:#methodsFile from:pack.
+
+"/ files := pack at:'files' ifAbsent:nil.
+"/ files notNil ifTrue:[
+"/ properties at:#'files' put:files.
+"/ ].
+ properties declare:#files from:pack.
"/ fetch class info
"/
@@ -1021,53 +1024,53 @@
"/ condition (optional) - #unix / #win32 / #vms / #macos / #always / #never / #autoload
"/ fileName (optional)
(pack at:'classes' default:#()) do:[:info |
- |condKey className optionalFileName|
-
- condKey := #always.
- info isSymbol ifTrue:[
- className := info.
- ] ifFalse:[
- className := info at:1.
- info size > 1 ifTrue:[
- condKey := info at:2.
- info size > 2 ifTrue:[
- optionalFileName := info at:3.
- ]
- ].
- ].
- self
- addClass:className
- conditionForInclusion:condKey
- classFileName:optionalFileName
+ |condKey className optionalFileName|
+
+ condKey := #always.
+ info isSymbol ifTrue:[
+ className := info.
+ ] ifFalse:[
+ className := info at:1.
+ info size > 1 ifTrue:[
+ condKey := info at:2.
+ info size > 2 ifTrue:[
+ optionalFileName := info at:3.
+ ]
+ ].
+ ].
+ self
+ addClass:className
+ conditionForInclusion:condKey
+ classFileName:optionalFileName
].
"/ fetch methods info
(pack at:'methods' default:#()) do:[:info |
- |condKey className methodName optionalFileName|
-
- condKey := #always.
- className := info at:1.
- methodName := info at:2.
- info size > 2 ifTrue:[
- optionalFileName := info at:3.
- info size > 3 ifTrue:[
- condKey := info at:4.
- ]
- ].
- self
- addMethod:methodName inClass:className
- conditionForInclusion:condKey
- fileName:optionalFileName
+ |condKey className methodName optionalFileName|
+
+ condKey := #always.
+ className := info at:1.
+ methodName := info at:2.
+ info size > 2 ifTrue:[
+ optionalFileName := info at:3.
+ info size > 3 ifTrue:[
+ condKey := info at:4.
+ ]
+ ].
+ self
+ addMethod:methodName inClass:className
+ conditionForInclusion:condKey
+ fileName:optionalFileName
].
self wasLoadedFromFile:true.
"/ all remaining properties
pack keysAndValuesDo:[:key :val |
- (key startsWith:'property.') ifTrue:[
- self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val.
- ]
+ (key startsWith:'property.') ifTrue:[
+ self propertyAt:(key copyFrom:'property.' size+1) asSymbol put:val.
+ ]
].
"
@@ -1515,13 +1518,20 @@
'.
classes do:[:cls |
- |clsInfo cond|
+ |clsInfo cond fileName|
clsInfo := self classInfoFor:cls.
cond := clsInfo conditionForInclusion.
(cond == #always or:[cond == #autoload]) ifTrue:[
out nextPutAll:' '''.
- cls nameWithoutNameSpacePrefix printOn:out.
+ fileName := clsInfo classFileName.
+ fileName isNil ifTrue:[
+ fileName := cls nameWithoutNameSpacePrefix
+ ].
+ (fileName endsWith:'.st') ifFalse:[
+ fileName := fileName , '.st'
+ ].
+ fileName printOn:out.
out nextPutAll:'.st'''.
out cr.
]
@@ -1886,7 +1896,7 @@
s nextPutAll:'OBJS='.
classes do:[:aClass |
- |abbrev clsInfo cond include|
+ |fileName clsInfo cond include|
clsInfo := self classInfoFor:aClass.
include := true.
@@ -1902,8 +1912,12 @@
].
include ifTrue:[
s nextPutAll:' \'. s cr.
- abbrev := Smalltalk fileNameForClass:aClass name.
- s nextPutAll:' $(OUTDIR)'; nextPutAll:abbrev; nextPutAll:'.$(O)'.
+ fileName := clsInfo classFileName.
+ fileName isNil ifTrue:[
+ fileName := Smalltalk fileNameForClass:aClass name.
+ ].
+ fileName := fileName asFilename withoutSuffix name.
+ s nextPutAll:' $(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O)'.
]
].
(methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[
@@ -1944,11 +1958,16 @@
'.
classes notNil ifTrue:[
classes do:[:aClass |
- |abbrev|
-
- abbrev := Smalltalk fileNameForClass:aClass name.
- s nextPutAll:'$(OUTDIR)'; nextPutAll:abbrev; nextPutAll:'.$(O): '.
- s nextPutAll:abbrev; nextPutAll:'.st '.
+ |fileName clsInfo|
+
+ clsInfo := self classInfoFor:aClass.
+ fileName := clsInfo classFileName.
+ fileName isNil ifTrue:[
+ fileName := Smalltalk fileNameForClass:aClass name.
+ ].
+ fileName := fileName asFilename withoutSuffix name.
+ s nextPutAll:'$(OUTDIR)'; nextPutAll:fileName; nextPutAll:'.$(O): '.
+ s nextPutAll:fileName; nextPutAll:'.st '.
"/ aClass allSuperclassesDo:[:superClass|
"/ s nextPutAll:(Smalltalk fileNameForClass:superClass name) , '.$(H) '.
"/ ].
@@ -2177,7 +2196,7 @@
s nextPutAll:'OBJS='.
classes do:[:aClass |
- |abbrev clsInfo cond include|
+ |clsInfo cond include fileName|
clsInfo := self classInfoFor:aClass.
include := true.
@@ -2193,8 +2212,12 @@
].
include ifTrue:[
s nextPutAll:' \'. s cr.
- abbrev := Smalltalk fileNameForClass:aClass name.
- s nextPutAll:' '; nextPutAll:abbrev; nextPutAll:'.$(O)'.
+ fileName := clsInfo classFileName.
+ fileName isNil ifTrue:[
+ fileName := Smalltalk fileNameForClass:aClass name.
+ ].
+ fileName := fileName asFilename withoutSuffix name.
+ s nextPutAll:' '; nextPutAll:fileName; nextPutAll:'.$(O)'.
]
].
(methodsFile := self propertyAt:#methodsFile) size > 0 ifTrue:[
@@ -3135,6 +3158,6 @@
!Project class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.118 1999-10-03 14:37:37 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.119 1999-10-03 15:30:13 cg Exp $'
! !
Project initialize!