--- a/ProjectBuilder.st Fri Oct 23 15:38:34 2009 +0200
+++ b/ProjectBuilder.st Fri Oct 23 15:38:38 2009 +0200
@@ -72,6 +72,10 @@
projectDefinitionClass := something.
!
+suffixForHeaderFiles
+ ^ OperatingSystem isUNIXlike ifTrue:['.H'] ifFalse:['.STH']
+!
+
usedCompiler:something
usedCompiler := something.
! !
@@ -106,10 +110,10 @@
makeOutput emphasis:nil.
]
];
- nextPutAllBlock:[:char |
- lock critical:[
+ nextPutAllBlock:[:string |
+ lock critical:[ (string includesString:'das Ziel' )ifTrue:[self halt].
makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}.
- makeOutput nextPutAll:char.
+ makeOutput nextPutAll:string.
makeOutput emphasis:nil.
]
].
@@ -119,9 +123,9 @@
makeOutput nextPut:char.
]
];
- nextPutAllBlock:[:char |
- lock critical:[
- makeOutput nextPutAll:char.
+ nextPutAllBlock:[:string |
+ lock critical:[ (string includesString:'das Ziel' )ifTrue:[self halt].
+ makeOutput nextPutAll:string.
]
].
@@ -299,6 +303,11 @@
sourceFile copyTo:targetFile
].
].
+
+ OperatingSystem isUNIXlike ifTrue:[
+ (targetDir / 'stc') makeExecutableForAll
+ ].
+
self activityNotification:nil
!
@@ -344,7 +353,6 @@
).
] ifFalse:[
files := #(
- 'librun/genDate'
'librun/main.c'
'librun/librun.so'
)
@@ -427,7 +435,7 @@
#endif /* _HEADER_CLASSINST_ */
'.
newContents := template bindWithArguments:bindings.
- file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),'.STH').
+ file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),(self suffixForHeaderFiles)).
(file exists not
or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[
file contents: newContents.
@@ -579,6 +587,16 @@
usedCompiler = 'lcc' ifTrue:[ makeCommand := 'lcmake'. compilerFlag := 'USELCC=1' ].
usedCompiler = 'gcc' ifTrue:[ makeCommand := 'make'. ].
+ OperatingSystem isUNIXlike ifTrue:[
+ OperatingSystem
+ executeCommand:'sh ../../stx/rules/stmkmf'
+ inputFrom:nil
+ outputTo:stdOut
+ errorTo:stdErr
+ inDirectory:(buildDirectory / module / directory)
+ onError:[:status| self error:'make failed'].
+ ].
+
projectDefinitionClass isLibraryDefinition ifTrue:[
OperatingSystem
executeCommand:(makeCommand,' classLibRule')
@@ -608,6 +626,19 @@
]
!
+recursiveCopyDirectoryForBuild:subdir
+ |targetDir|
+
+ targetDir := buildDirectory / 'stx' / subdir.
+ targetDir exists ifFalse:[
+ targetDir makeDirectory.
+ ].
+ (mySTXTopDirectory / subdir) directoryContentsAsFilenamesDo:[:eachFile |
+ eachFile recursiveCopyTo:(targetDir construct:eachFile baseName)
+ ].
+ self activityNotification:nil
+!
+
setupBuildDirectory
buildDirectory exists ifFalse:[
buildDirectory recursiveMakeDirectory.
@@ -618,6 +649,9 @@
self copyDirectoryForBuild:'include'.
self copyDirectoryForBuild:'rules'.
+ OperatingSystem isUNIXlike ifTrue:[
+ self recursiveCopyDirectoryForBuild:'configurations'.
+ ]
!
validateBuildDirectoryIsPresent