--- a/LibraryDefinition.st Wed Aug 09 21:54:35 2006 +0200
+++ b/LibraryDefinition.st Wed Aug 09 22:15:42 2006 +0200
@@ -16,6 +16,9 @@
classes := OrderedCollection new.
Smalltalk allClassesInPackage:aPackageID
do:[:eachClass |
+ eachClass isLoaded ifFalse:[
+ eachClass autoload
+ ].
(eachClass isSubclassOf:ProjectDefinition) ifTrue:[
classes add:eachClass
]
@@ -112,6 +115,33 @@
"Created: / 09-08-2006 / 16:16:16 / fm"
!
+msdosPathToPackage:aPackageID
+"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
+
+ ^ self msdosPathToTop , '\..\' , (aPackageID asString copy replaceAll:$: by:$/)
+
+"
+ DapasX_Datenbasis pathToPackage:'bosch:dapasx/kernel'
+"
+
+ "Created: / 09-08-2006 / 16:35:22 / fm"
+!
+
+msdosPathToTop
+"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
+
+
+ ^ (((1 to:(self package asCollectionOfSubstringsSeparatedByAny:':/') size)
+ collect:[:n | '..\']) asStringWith:'') , 'stx'
+
+"
+ DapasXProject pathToTop
+ DapasX_Datenbasis pathToTop
+"
+
+ "Created: / 09-08-2006 / 15:45:54 / fm"
+!
+
parentProject
^(self package asString subStrings: $/) first
@@ -125,10 +155,10 @@
"Modified: / 08-08-2006 / 10:47:37 / fm"
!
-pathToPackage:aPackageID
+unixPathToPackage:aPackageID
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
- ^ self pathToTop , '/../' , (aPackageID asString copy replaceAll:$: by:$/)
+ ^ self unixPathToTop , '/../' , (aPackageID asString copy replaceAll:$: by:$/)
"
DapasX_Datenbasis pathToPackage:'bosch:dapasx/kernel'
@@ -137,9 +167,10 @@
"Created: / 09-08-2006 / 16:35:22 / fm"
!
-pathToTop
+unixPathToTop
"Returns the path to stx counting the number of $/ and $: in the package name and adding for each one '../' to get the ST/X top directory"
+
^ (((1 to:(self package asCollectionOfSubstringsSeparatedByAny:':/') size)
collect:[:n | '../']) asStringWith:'') , 'stx'
@@ -161,13 +192,18 @@
^ String
streamContents:[:s |
self allClassNames do:[:eachClassName |
- |cls|
+ |cls fn|
cls := Smalltalk classNamed:eachClassName.
cls autoload.
s nextPutAll:eachClassName.
s nextPutAll:' '.
- s nextPutAll:cls classFilename asFilename withoutSuffix name.
+ fn := cls classFilename asFilename withoutSuffix baseName.
+ (fn includes:Character space) ifTrue:[
+ s nextPutAll:fn storeString.
+ ] ifFalse:[
+ s nextPutAll:fn.
+ ].
s nextPutAll:' '.
s nextPutAll:cls package.
s nextPutAll:' '.
@@ -647,9 +683,9 @@
make_dot_proto_mappings
^Dictionary new
- at: #'TOP' put: [self topDirectory];
+ at: #'TOP' put: [self unixPathToTop];
at: #'SUBDIRECTORIES' put: [self generateSubDirectories];
- at: #'LOCAL_INCLUDES' put: [self generateLocalIncludes];
+ at: #'LOCAL_INCLUDES' put: [self generateUnixLocalIncludes];
at: #'LOCAL_DEFINES' put: [''];
yourself
@@ -683,8 +719,8 @@
nt_dot_mak_mappings
^Dictionary new
- at: #'TOP' put: [self topDirectory];
- at: #'LOCAL_INCLUDES' put: [self generateLocalIncludes];
+ at: #'TOP' put: [self msdosPathToTop];
+ at: #'LOCAL_INCLUDES' put: [self generateMsdosLocalIncludes];
yourself
"Created: / 09-08-2006 / 11:44:36 / fm"
@@ -694,7 +730,7 @@
objectLine_make_dot_spec_mappings: aClassName
^Dictionary new
- at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix name];
+ at: #'CLASS' put: [(Smalltalk classNamed:aClassName) classFilename asFilename withoutSuffix baseName];
yourself
"Created: / 08-08-2006 / 20:17:28 / fm"
@@ -754,12 +790,12 @@
"Created: / 09-08-2006 / 11:23:34 / fm"
!
-generateLocalIncludes
+generateMsdosLocalIncludes
^self searchForProjectsWhichProvideHeaderFiles
inject: ''
into:[:objectLines :includeProjectName |
- objectLines , ' -I',(self pathToPackage: includeProjectName)
+ objectLines , ' -I',(self msdosPathToPackage: includeProjectName)
]
"
@@ -831,6 +867,23 @@
"Created: / 09-08-2006 / 11:26:59 / fm"
!
+generateUnixLocalIncludes
+
+^self searchForProjectsWhichProvideHeaderFiles
+ inject: ''
+ into:[:objectLines :includeProjectName |
+ objectLines , ' -I',(self unixPathToPackage: includeProjectName)
+ ]
+
+"
+ DapasXProject generateLocalIncludes
+ DapasX_Datenbasis generateLocalIncludes
+
+"
+
+ "Created: / 09-08-2006 / 16:46:49 / fm"
+!
+
prerequisiteProjectsOrdered
^self prerequisiteProjects asSortedCollection:[:a :b | ]
@@ -940,15 +993,6 @@
"Created: / 08-08-2006 / 11:08:23 / fm"
!
-topDirectory
-" position (of this package) in directory hierarchy:
- (must point to ST/X top directory, for tools and includes)"
-^self pathToTop
-
- "Created: / 08-08-2006 / 21:09:46 / fm"
- "Modified: / 09-08-2006 / 15:50:14 / fm"
-!
-
versionNumber
"Returns a version string which will appear in nt.def and in the files info inside it's properties "
@@ -1313,5 +1357,5 @@
!ProjectDefinition class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.5 2006-08-09 19:54:35 fm Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/LibraryDefinition.st,v 1.6 2006-08-09 20:15:42 fm Exp $'
! !