class: Tools::ProjectBuilder
authorClaus Gittinger <cg@exept.de>
Tue, 06 Aug 2013 10:39:20 +0200
changeset 30427022b69410ab
parent 3041 380d18b00312
child 3043 457d1202c86b
class: Tools::ProjectBuilder
added: #generateBuildSupportFilesByFilingOutIn:forDefinitionClass:
changed: #generateSourceFilesByFilingOut
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Mon Aug 05 21:17:05 2013 +0200
     1.2 +++ b/ProjectBuilder.st	Tue Aug 06 10:39:20 2013 +0200
     1.3 @@ -746,6 +746,22 @@
     1.4      "Modified: / 15-08-2011 / 14:58:46 / cg"
     1.5  !
     1.6  
     1.7 +generateBuildSupportFilesByFilingOutIn:packageTargetDir forDefinitionClass:projectDefinitionClass
     1.8 +    |fullPathName|
     1.9 +
    1.10 +    projectDefinitionClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents |
    1.11 +        fullPathName := packageTargetDir construct:fileName.
    1.12 +        fullPathName directory exists ifFalse:[
    1.13 +            "take care for files like 'autopackage/default.apspec'"
    1.14 +            fullPathName directory makeDirectory.
    1.15 +        ].
    1.16 +        (fullPathName exists
    1.17 +         and:[ fullPathName contents = fileContents ]) ifFalse:[
    1.18 +            fullPathName contents:fileContents.
    1.19 +        ].
    1.20 +    ].    
    1.21 +!
    1.22 +
    1.23  generateSourceFiles
    1.24      (self isLocalBuild not and:[ sourceCodeManager notNil ])  ifTrue:[
    1.25          "/ check out / generate files there
    1.26 @@ -805,8 +821,6 @@
    1.27      "/ local build
    1.28      "/ fileout the project
    1.29  
    1.30 -    |fullPathName|
    1.31 -
    1.32      (package module ~= 'stx') ifTrue:[
    1.33          (buildDirectory / package module) makeDirectory.
    1.34      ].
    1.35 @@ -865,21 +879,11 @@
    1.36  "/                cls fileOutIn:packageTargetDir
    1.37  "/            ]
    1.38  "/        ].
    1.39 -
    1.40 -        projectDefinitionClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents |
    1.41 -            fullPathName := packageTargetDir construct:fileName.
    1.42 -            fullPathName directory exists ifFalse:[
    1.43 -                "take care for files like 'autopackage/default.apspec'"
    1.44 -                fullPathName directory makeDirectory.
    1.45 -            ].
    1.46 -            (fullPathName exists
    1.47 -             and:[ fullPathName contents = fileContents ]) ifFalse:[
    1.48 -                fullPathName contents:fileContents.
    1.49 -            ].
    1.50 -        ].    
    1.51 +        self generateBuildSupportFilesByFilingOutIn:packageTargetDir forDefinitionClass:projectDefinitionClass.
    1.52      ].
    1.53      self makeQuick ifFalse:[
    1.54 -        "/ generate header files in prerequisite packages...
    1.55 +        "/ generate header files and build support files
    1.56 +        "/ in prerequisite packages...
    1.57          (projectDefinitionClass allPreRequisites)
    1.58          do:[:eachPackageToFileout |
    1.59              |packageId packageDef packageModule packageDirectory packageTargetDir|
    1.60 @@ -905,6 +909,8 @@
    1.61                  ].
    1.62              ].
    1.63              self copyResourcesForPackage:eachPackageToFileout.
    1.64 +            self generateBuildSupportFilesByFilingOutIn:packageTargetDir forDefinitionClass:packageDef.
    1.65 +            (packageTargetDir / '.NOSOURCE') contents:'existence of this file suppresses compilation of st files'.
    1.66          ].
    1.67      ].
    1.68