class: Tools::ProjectBuilder
authorClaus Gittinger <cg@exept.de>
Fri, 08 Mar 2013 15:43:26 +0100
changeset 296444fd164ad253
parent 2963 7df17046fc89
child 2965 9725f13947de
class: Tools::ProjectBuilder
class definition
added:
#isLocalBuild
#isLocalBuild:
#isQuickBuild
#isQuickBuild:
fix: also need to copy genDate
changed:
#buildWithOutputTo:errorTo:
#copyDirectoryForBuild:
#copySupportFilesForCompilation
#generateSourceFiles
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Wed Mar 06 10:02:27 2013 +0100
     1.2 +++ b/ProjectBuilder.st	Fri Mar 08 15:43:26 2013 +0100
     1.3 @@ -16,7 +16,7 @@
     1.4  Object subclass:#ProjectBuilder
     1.5  	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
     1.6  		myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream
     1.7 -		makeExeOnly usedCompiler stdOut stdErr'
     1.8 +		makeExeOnly usedCompiler stdOut stdErr isQuickBuild isLocalBuild'
     1.9  	classVariableNames:'PreviousBuildDirectory'
    1.10  	poolDictionaries:''
    1.11  	category:'System-Support-Projects'
    1.12 @@ -143,6 +143,27 @@
    1.13      buildDirectory := something.
    1.14  !
    1.15  
    1.16 +isLocalBuild
    1.17 +    ^ isLocalBuild ? false
    1.18 +!
    1.19 +
    1.20 +isLocalBuild:aBoolean
    1.21 +    "create a files without going through the source code manager"
    1.22 +
    1.23 +    isLocalBuild := aBoolean.
    1.24 +!
    1.25 +
    1.26 +isQuickBuild
    1.27 +    ^ isQuickBuild ? false
    1.28 +!
    1.29 +
    1.30 +isQuickBuild:aBoolean
    1.31 +    "skips creation of header files, and copying of support files, if possible
    1.32 +     to speedup a build. Use with care."
    1.33 +
    1.34 +    isQuickBuild := aBoolean.
    1.35 +!
    1.36 +
    1.37  makeExeOnly:aBoolean
    1.38      makeExeOnly := aBoolean.
    1.39  !
    1.40 @@ -259,7 +280,7 @@
    1.41      PreviousBuildDirectory := buildDirectory.
    1.42  
    1.43      "/ UserPreferences current localBuild:true
    1.44 -    UserPreferences current localBuild ifFalse:[
    1.45 +    (self isLocalBuild or:[UserPreferences current localBuild]) ifFalse:[
    1.46          SourceCodeManager notNil ifTrue:[
    1.47              sourceCodeManager := SourceCodeManagerUtilities default sourceCodeManagerFor:projectDefinitionClass.
    1.48          ]
    1.49 @@ -408,6 +429,8 @@
    1.50      targetDir := buildDirectory / 'stx' / subdir.
    1.51      targetDir exists ifFalse:[
    1.52          targetDir makeDirectory.
    1.53 +    ] ifTrue:[
    1.54 +        self isQuickBuild ifTrue:[^ self]
    1.55      ].
    1.56      (mySTXTopDirectory / subdir) directoryContentsAsFilenamesDo:[:eachFile |
    1.57          eachFile isDirectory ifFalse:[
    1.58 @@ -508,16 +531,15 @@
    1.59      files := #().
    1.60  
    1.61      OperatingSystem isMSWINDOWSlike ifTrue:[
    1.62 +        files := files , #( 'librun/genDate.com' ).
    1.63          usedCompiler = 'tcc' ifTrue:[
    1.64              files := files , #( 
    1.65                          'support/tcc'
    1.66                      ).
    1.67          ].
    1.68      ] ifFalse:[
    1.69 -        files := files , #(
    1.70 -                )
    1.71 +        files := files , #( 'librun/genDate' ).
    1.72      ].
    1.73 -    files := files asOrderedCollection.
    1.74  
    1.75      files do:[:relativePath |
    1.76          (mySTXTopDirectory / relativePath) exists ifTrue:[
    1.77 @@ -684,7 +706,7 @@
    1.78  !
    1.79  
    1.80  generateSourceFiles
    1.81 -    sourceCodeManager notNil ifTrue:[
    1.82 +    (self isLocalBuild not and:[ sourceCodeManager notNil ])  ifTrue:[
    1.83          "/ check out / generate files there
    1.84          self generateSourceFilesByCheckingOutUsing:sourceCodeManager
    1.85      ] ifFalse:[