ParserFlags.st
changeset 3500 60e5d213dd64
parent 3462 896d56e60c6a
child 3506 e8b4502d405f
--- a/ParserFlags.st	Fri Jul 11 02:24:07 2014 +0200
+++ b/ParserFlags.st	Fri Jul 11 02:24:30 2014 +0200
@@ -1605,117 +1605,117 @@
 
     topDir := topDirArg.
     OperatingSystem isMSWINDOWSlike ifTrue:[
-	topDirArg isString ifTrue:[
-	    topDir := topDirArg copyReplaceAll:$/ with:$\.
-	]
+        topDirArg isString ifTrue:[
+            topDir := topDirArg copyReplaceAll:$/ with:$\ ifNone:topDirArg.
+        ]
     ].
     topDir := topDir asFilename.
     topDirName := topDir name.
 
     "/ if in the development directory, use ./modules
     Smalltalk isSmalltalkDevelopmentSystem ifTrue:[
-	STCModulePath := 'modules'.
+        STCModulePath := 'modules'.
     ] ifFalse:[
-	STCModulePath := Filename tempDirectory constructString:'modules'.
+        STCModulePath := Filename tempDirectory constructString:'modules'.
     ].
 
     (topDir construct:'stc') exists ifFalse:[
-	('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR.
-	'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR.
-	STCCompilation := #never.
+        ('ParserFlags [warning]: stc not found in "',topDirName,'"') infoPrintCR.
+        'ParserFlags [warning]: stc-compiling (primitive code) will not work in the browser' infoPrintCR.
+        STCCompilation := #never.
     ].
 
     OperatingSystem isMSWINDOWSlike ifTrue:[
-	useBorlandC := useVisualC := useMingw := false.
-
-	STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'.
-	(bccTop := BCCTop) isNil ifTrue:[
-	    bccTop := #(
-			'C:\Borland\bcc55'
-		       ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
-	].
-
-	(bccTop notNil and:[bccTop asFilename exists]) ifTrue:[
-	    STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'.
-	    LibDirectory := topDirName,'\lib\bc'.
-	    LinkArgs := '-L',topDirName,'\lib\bc'.
-	    LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'.
-	    CCPath := 'bcc32'.
-	    MakeCommand := 'bmake'.
-	    LinkCommand := 'ilink32'.
-	    CCCompilationOptions := '-w-'.
-	    useBorlandC := true.
-	] ifFalse:[
-	    (vcTop := VCTop) isNil ifTrue:[
-		vcTop := #(
-			    'C:\Program Files\Microsoft Visual Studio 11.0\VC'
-			    'C:\Program Files\Microsoft Visual Studio 10.0\VC'
-			    'C:\Program Files\Microsoft Visual Studio 9.0\VC'
-			  ) detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] ifNone:nil.
-	    ].
-	    (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[
-		useVisualC := true.
-		STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'.
-
-		(sdkTop := SDKTop) isNil ifTrue:[
-		    sdkTop := #(
-				'C:\Program Files\Microsoft SDKs\Windows\v7.0A'
-				'C:\Program Files\Microsoft SDKs\Windows\v6.0A'
-			      ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
-		].
-		(sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[
-		    STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'.
-		].
-		LibDirectory := topDirName,'\lib\vc'.
-		LinkArgs := '-L',topDirName,'\lib\vc'.
-		LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
-		CCPath := vcTop,'\bin\cl.exe'.
-		LinkCommand := 'ilink32'.
-		MakeCommand := 'vcmake'.
-		CCCompilationOptions := '/nologo /ZI  /w /GF /EHsc /FR.\objvc\'.
-	    ] ifFalse:[
-		"/ add definitions for lcc, mingc etc.
-		STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'.
-		LibDirectory := topDirName,'\lib\vc'.
-		LinkArgs := '-L',topDirName,'\lib\vc'.
-		LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
-	    ].
-	].
-	STCCompilationDefines := '-DWIN32'.
-	STCCompilationOptions := '+optinline +inlineNew'.
-	(topDirName,'\stc\stc.exe') asFilename exists ifTrue:[
-	    STCPath := (topDirName,'\stc\stc.exe').
-	] ifFalse:[
-	    STCPath := 'stc.exe'.
-	].
-	LibPath := ''.
-	SearchedLibraries := #('import32.lib').
-	"/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib').
+        useBorlandC := useVisualC := useMingw := false.
+
+        STCCompilationIncludes := '-I',topDirName,'\include -I',topDirName,'\libopengl'.
+        (bccTop := BCCTop) isNil ifTrue:[
+            bccTop := #(
+                        'C:\Borland\bcc55'
+                       ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
+        ].
+
+        (bccTop notNil and:[bccTop asFilename exists]) ifTrue:[
+            STCCompilationIncludes := STCCompilationIncludes,' -I',bccTop,'\Include'.
+            LibDirectory := topDirName,'\lib\bc'.
+            LinkArgs := '-L',topDirName,'\lib\bc'.
+            LinkArgs := LinkArgs,' -L',bccTop,'\Lib -r -c -ap -Tpd -Gi -w-dup'.
+            CCPath := 'bcc32'.
+            MakeCommand := 'bmake'.
+            LinkCommand := 'ilink32'.
+            CCCompilationOptions := '-w-'.
+            useBorlandC := true.
+        ] ifFalse:[
+            (vcTop := VCTop) isNil ifTrue:[
+                vcTop := #(
+                            'C:\Program Files\Microsoft Visual Studio 11.0\VC'
+                            'C:\Program Files\Microsoft Visual Studio 10.0\VC'
+                            'C:\Program Files\Microsoft Visual Studio 9.0\VC'
+                          ) detect:[:path | path asFilename exists and:[(path asFilename construct:'bin/cl.exe') exists]] ifNone:nil.
+            ].
+            (vcTop notNil and:[vcTop asFilename exists]) ifTrue:[
+                useVisualC := true.
+                STCCompilationIncludes := STCCompilationIncludes,' -I',vcTop,'include'.
+
+                (sdkTop := SDKTop) isNil ifTrue:[
+                    sdkTop := #(
+                                'C:\Program Files\Microsoft SDKs\Windows\v7.0A'
+                                'C:\Program Files\Microsoft SDKs\Windows\v6.0A'
+                              ) detect:[:path | path asFilename exists and:[(path asFilename construct:'include') exists]] ifNone:nil.
+                ].
+                (sdkTop notNil and:[sdkTop asFilename exists]) ifTrue:[
+                    STCCompilationIncludes := STCCompilationIncludes,' -I',sdkTop,'\include'.
+                ].
+                LibDirectory := topDirName,'\lib\vc'.
+                LinkArgs := '-L',topDirName,'\lib\vc'.
+                LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
+                CCPath := vcTop,'\bin\cl.exe'.
+                LinkCommand := 'ilink32'.
+                MakeCommand := 'vcmake'.
+                CCCompilationOptions := '/nologo /ZI  /w /GF /EHsc /FR.\objvc\'.
+            ] ifFalse:[
+                "/ add definitions for lcc, mingc etc.
+                STCCompilationIncludes := STCCompilationIncludes,' -IC:\xxxxx\Include'.
+                LibDirectory := topDirName,'\lib\vc'.
+                LinkArgs := '-L',topDirName,'\lib\vc'.
+                LinkArgs := LinkArgs,' -r -c -ap -Tpd -Gi -w-dup'.
+            ].
+        ].
+        STCCompilationDefines := '-DWIN32'.
+        STCCompilationOptions := '+optinline +inlineNew'.
+        (topDirName,'\stc\stc.exe') asFilename exists ifTrue:[
+            STCPath := (topDirName,'\stc\stc.exe').
+        ] ifFalse:[
+            STCPath := 'stc.exe'.
+        ].
+        LibPath := ''.
+        SearchedLibraries := #('import32.lib').
+        "/ SearchedLibraries := #('import32.lib' 'glu32.lib' 'opengl32.lib').
     ] ifFalse:[
-	STCCompilationIncludes := '-I',topDirName,'/include'.
-	STCCompilationDefines := ''.
-	STCCompilationOptions := '+optinline +inlineNew'.
-	STCPath := topDirName,'/stc/stc'.
-
-	m32 := ''.
-	(ExternalAddress pointerSize == 4) ifTrue:[
-	    m32 := ' -m32'
-	].
-	CCCompilationOptions := OperatingSystem getCPUDefine,
-				' -D', self usedCompilerDefine,
-				' ', OperatingSystem getOSDefine,
-				' ', '-O', m32.
-	ParserFlags useGnuC ifTrue:[
-	    CCPath := 'gcc'
-	] ifFalse:[
-	    CCPath := 'cc'
-	].
-	LinkArgs := m32.
-	LinkSharedArgs := '-shared', m32.
-	LinkCommand := CCPath.
-	LibPath := ''.
-	SearchedLibraries := #().
-	MakeCommand := 'make'.
+        STCCompilationIncludes := '-I',topDirName,'/include'.
+        STCCompilationDefines := ''.
+        STCCompilationOptions := '+optinline +inlineNew'.
+        STCPath := topDirName,'/stc/stc'.
+
+        m32 := ''.
+        (ExternalAddress pointerSize == 4) ifTrue:[
+            m32 := ' -m32'
+        ].
+        CCCompilationOptions := OperatingSystem getCPUDefine,
+                                ' -D', self usedCompilerDefine,
+                                ' ', OperatingSystem getOSDefine,
+                                ' ', '-O', m32.
+        ParserFlags useGnuC ifTrue:[
+            CCPath := 'gcc'
+        ] ifFalse:[
+            CCPath := 'cc'
+        ].
+        LinkArgs := m32.
+        LinkSharedArgs := '-shared', m32.
+        LinkCommand := CCPath.
+        LibPath := ''.
+        SearchedLibraries := #().
+        MakeCommand := 'make'.
     ].
 
     "
@@ -2643,11 +2643,11 @@
 !ParserFlags class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.117 2014-06-02 13:52:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.118 2014-07-11 00:24:30 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.117 2014-06-02 13:52:08 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/ParserFlags.st,v 1.118 2014-07-11 00:24:30 cg Exp $'
 ! !