STCCompilerInterface.st
changeset 2656 d3f4404f3e23
parent 2649 0e257259566f
child 2658 92f1a346dbeb
--- a/STCCompilerInterface.st	Tue Aug 09 13:58:20 2011 +0200
+++ b/STCCompilerInterface.st	Tue Aug 09 14:59:38 2011 +0200
@@ -155,7 +155,7 @@
      an redefined in subclasses which can do it (either by direct compilation, or by calling
      the external stc do do it)."
 
-    |handle oldMethod newMethod ok moduleFileName|
+    |handle oldMethod newMethod ok moduleFileName dllFileName|
 
     install ifFalse:[
         "/ cannot do it uninstalled. reason:
@@ -215,13 +215,13 @@
         "
         originator activityNotification:'linking'.
 
-        oFileName := ObjectFileLoader createLoadableObjectFor:(oFileName asFilename withoutSuffix).
-        oFileName isNil ifTrue:[
+        dllFileName := ObjectFileLoader createLoadableObjectFor:(oFileName asFilename withoutSuffix name).
+        dllFileName isNil ifTrue:[
             "/ something went wrong
             originator parseError:('link error: ' , ObjectFileLoader lastError) position:1.
             ^ #CannotLoad
         ].
-        oFileName asFilename exists ifFalse:[
+        dllFileName asFilename exists ifFalse:[
             originator parseError:'link failed - cannot create machine code' position:1.
             ^ #CannotLoad
         ].
@@ -234,9 +234,9 @@
         "
         originator activityNotification:'loading'.
 
-        handle := ObjectFileLoader loadMethodObjectFile:oFileName.
+        handle := ObjectFileLoader loadMethodObjectFile:dllFileName.
         handle isNil ifTrue:[
-            OperatingSystem removeFile:oFileName.
+            OperatingSystem removeFile:dllFileName.
             "catch, so that #CannotLoad processing is done"
             Parser parseErrorSignal catch:[
                 originator parseError:'dynamic load of machine code failed' position:1.
@@ -318,10 +318,10 @@
             OperatingSystem removeFile:stFileName.
             OperatingSystem removeFile:'errorOutput'.
         ].
-        parserFlags stcKeepOIntermediate == true ifFalse:[
+        parserFlags stcKeepOIntermediate ~~ true ifTrue:[
             (oFileName notNil and:[oFileName asFilename exists]) ifTrue:[oFileName asFilename delete].
         ].
-        parserFlags stcKeepCIntermediate == true ifFalse:[
+        parserFlags stcKeepCIntermediate ~~ true ifTrue:[
             (cFileName notNil and:[cFileName asFilename exists]) ifTrue:[cFileName asFilename delete].
         ].
         OperatingSystem isMSDOSlike ifTrue:[
@@ -461,7 +461,8 @@
     ] ifFalse:[
         command := ccPath
     ].
-    command := command , ' ' , cFlags , ' -D__INCREMENTAL_COMPILE__ -c ' , cFileName, ' -o ', oFileName.
+    "Note: Windows/bcc32 does not understand a space between -o and filename"
+    command := command , ' ' , cFlags , ' -D__INCREMENTAL_COMPILE__ -o', oFileName, ' -c ' , cFileName.
 
     Verbose == true ifTrue:[
         'executing: ' infoPrint. command infoPrintCR.
@@ -840,11 +841,11 @@
 !STCCompilerInterface class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.23 2011-08-09 10:51:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.24 2011-08-09 12:59:38 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.23 2011-08-09 10:51:54 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/STCCompilerInterface.st,v 1.24 2011-08-09 12:59:38 stefan Exp $'
 ! !
 
 STCCompilerInterface initialize!