ProjectBuilder.st
changeset 2680 3f2dbbd7743f
parent 2678 cca2788228ad
child 2683 ff39502be3a2
     1.1 --- a/ProjectBuilder.st	Thu Oct 22 23:45:23 2009 +0200
     1.2 +++ b/ProjectBuilder.st	Fri Oct 23 14:47:28 2009 +0200
     1.3 @@ -5,7 +5,7 @@
     1.4  Object subclass:#ProjectBuilder
     1.5  	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
     1.6  		myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream
     1.7 -		makeExeOnly'
     1.8 +		makeExeOnly usedCompiler'
     1.9  	classVariableNames:'PreviousBuildDirectory'
    1.10  	poolDictionaries:''
    1.11  	category:'System-Support-Projects'
    1.12 @@ -70,6 +70,10 @@
    1.13  
    1.14  projectDefinitionClass:something
    1.15      projectDefinitionClass := something.
    1.16 +!
    1.17 +
    1.18 +usedCompiler:something
    1.19 +    usedCompiler := something.
    1.20  ! !
    1.21  
    1.22  !ProjectBuilder methodsFor:'building'!
    1.23 @@ -565,14 +569,19 @@
    1.24  !
    1.25  
    1.26  makeWithOutputTo:stdOut errorTo:stdErr
    1.27 -    |module directory|
    1.28 +    |module directory compilerFlag makeCommand|
    1.29  
    1.30      module := package module.
    1.31      directory := package directory.
    1.32  
    1.33 +    makeCommand := ParserFlags makeCommand.
    1.34 +    usedCompiler = 'vc' ifTrue:[ makeCommand := 'vcmake'. compilerFlag := 'USEVC=1' ].
    1.35 +    usedCompiler = 'lcc' ifTrue:[ makeCommand := 'lcmake'. compilerFlag := 'USELCC=1' ].
    1.36 +    usedCompiler = 'gcc' ifTrue:[ makeCommand := 'make'. ].
    1.37 +
    1.38      projectDefinitionClass isLibraryDefinition ifTrue:[
    1.39          OperatingSystem
    1.40 -            executeCommand:(ParserFlags makeCommand,' classLibRule')
    1.41 +            executeCommand:(makeCommand,' classLibRule')
    1.42              inputFrom:nil
    1.43              outputTo:stdOut
    1.44              errorTo:stdErr
    1.45 @@ -580,7 +589,7 @@
    1.46              onError:[:status| self error:'make failed'].
    1.47      ] ifFalse:[
    1.48          OperatingSystem
    1.49 -            executeCommand:(ParserFlags makeCommand,' exe')
    1.50 +            executeCommand:(makeCommand,' exe')
    1.51              inputFrom:nil
    1.52              outputTo:stdOut
    1.53              errorTo:stdErr
    1.54 @@ -589,7 +598,7 @@
    1.55  
    1.56          (makeExeOnly ? false) ifFalse:[
    1.57              OperatingSystem
    1.58 -                executeCommand:(ParserFlags makeCommand,' setup')
    1.59 +                executeCommand:(makeCommand,' setup')
    1.60                  inputFrom:nil
    1.61                  outputTo:stdOut
    1.62                  errorTo:stdErr