added: #buildDirectory:
authorClaus Gittinger <cg@exept.de>
Tue, 20 Oct 2009 21:51:54 +0200
changeset 26343f14301cec84
parent 2633 4a48f107431a
child 2635 8b62bd023558
added: #buildDirectory:
changed: #buildWithOutputTo:errorTo:
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Tue Oct 20 21:48:02 2009 +0200
     1.2 +++ b/ProjectBuilder.st	Tue Oct 20 21:51:54 2009 +0200
     1.3 @@ -21,86 +21,40 @@
     1.4  
     1.5  !ProjectBuilder class methodsFor:'examples'!
     1.6  
     1.7 -example1
     1.8 -    Smalltalk loadPackage:'stx:projects/helloWorldApp' asAutoloaded:true.
     1.9 -
    1.10 -    self new
    1.11 -        package:'stx:projects/helloWorldApp';
    1.12 -        build
    1.13  !
    1.14  
    1.15 -example2
    1.16 -    |builder|
    1.17 -
    1.18 -    Smalltalk loadPackage:'stx:clients/Demos/foxCalcApplication' asAutoloaded:true.
    1.19 -
    1.20 -    builder := self new.
    1.21 -    builder package:'stx:clients/Demos/foxCalcApplication'.
    1.22 -    builder build.
    1.23 -
    1.24 -    UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
    1.25 +methodsFor:'examples'
    1.26  ! !
    1.27  
    1.28  !ProjectBuilder methodsFor:'accessing'!
    1.29  
    1.30 -buildDirectory
    1.31 -    ^ buildDirectory
    1.32 +x:clients/Demos/foxCalcApplication'.
    1.33 +    builder build.
    1.34 +
    1.35 +    UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
    1.36  !
    1.37  
    1.38 -package:aPackageIDOrSymbol
    1.39 -    package := aPackageIDOrSymbol asPackageId.
    1.40 +buildDirectory:something
    1.41 +    buildDirectory := something.
    1.42 +!
    1.43 +
    1.44 +uilder build.
    1.45 +
    1.46 +    UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
    1.47 +!
    1.48 +
    1.49 +kageBuildDirectory.
    1.50  !
    1.51  
    1.52  packageBuildDirectory
    1.53      "the directoray, where the deployable binary is created (xxxSetup.exe)"
    1.54  
    1.55      ^ buildDirectory / (package asPackageId module) / (package asPackageId directory)
    1.56 -!
    1.57 -
    1.58 -projectDefinitionClass:something
    1.59 -    projectDefinitionClass := something.
    1.60  ! !
    1.61  
    1.62  !ProjectBuilder methodsFor:'building'!
    1.63  
    1.64 -build
    1.65 -    "/ intermediate - this will move into a commonly used utility class
    1.66 -    "/ (where all the project code support will be collected).
    1.67 -
    1.68 -    |makeOutput stdOut stdErr lock|
    1.69 -
    1.70 -    lock := Semaphore forMutualExclusion.
    1.71 -    makeOutput := TextStream on:(Text new:10000).
    1.72 -    stdErr := ActorStream new
    1.73 -                    nextPutBlock:[:char |
    1.74 -                        lock critical:[
    1.75 -                            makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}.
    1.76 -                            makeOutput nextPut:char.
    1.77 -                            makeOutput emphasis:nil.
    1.78 -                        ]
    1.79 -                    ];
    1.80 -                    nextPutAllBlock:[:char |
    1.81 -                        lock critical:[
    1.82 -                            makeOutput emphasis:{#backgroundColor->Color red. #color->Color white.}.
    1.83 -                            makeOutput nextPutAll:char.
    1.84 -                            makeOutput emphasis:nil.
    1.85 -                        ]
    1.86 -                    ].
    1.87 -    stdOut := ActorStream new
    1.88 -                    nextPutBlock:[:char |
    1.89 -                        lock critical:[
    1.90 -                            makeOutput nextPut:char.
    1.91 -                        ]
    1.92 -                    ];
    1.93 -                    nextPutAllBlock:[:char |
    1.94 -                        lock critical:[
    1.95 -                            makeOutput nextPutAll:char.
    1.96 -                        ]
    1.97 -                    ].
    1.98 -
    1.99 -    self buildWithOutputTo:stdOut errorTo:stdErr.
   1.100 -
   1.101 -    TextView openWith:makeOutput contents.
   1.102 +(package asPackageId module) / (package asPackageId directory)
   1.103  !
   1.104  
   1.105  buildWithOutputTo:stdOut errorTo:stdErr
   1.106 @@ -122,9 +76,11 @@
   1.107      module := package module.
   1.108      directory := package directory.
   1.109  
   1.110 -    buildDirectory := PreviousBuildDirectory ifNil:[ UserPreferences current buildDirectory ].
   1.111      buildDirectory isNil ifTrue:[
   1.112 -        buildDirectory := Filename tempDirectory construct:'stx_build'.
   1.113 +        buildDirectory := PreviousBuildDirectory ifNil:[ UserPreferences current buildDirectory ].
   1.114 +        buildDirectory isNil ifTrue:[
   1.115 +            buildDirectory := Filename tempDirectory construct:'stx_build'.
   1.116 +        ].
   1.117      ].
   1.118      buildDirectory := buildDirectory asFilename.
   1.119  
   1.120 @@ -167,65 +123,27 @@
   1.121      self makeWithOutputTo:stdOut errorTo:stdErr.
   1.122  !
   1.123  
   1.124 -copyDLLsForLinkage
   1.125 -    |targetBuildDir|
   1.126 +...'.
   1.127 +    self copySupportFilesForLinkage.
   1.128 +    self copyStartupFilesFromSmalltalk.
   1.129  
   1.130 -    targetBuildDir := buildDirectory / package module / package directory.
   1.131 +    self activityNotification:'Executing make...'.
   1.132 +    self makeWithOutputTo:stdOut errorTo:stdErr.
   1.133 +!
   1.134  
   1.135 -    (projectDefinitionClass allPreRequisites)
   1.136 -    do:[:eachPackageToFileout |
   1.137 -        |packageId packageDef packageModule packageDirectory packageTargetDir
   1.138 -         dllSource dllSourceDir libraryName dllRelativePath|
   1.139 -
   1.140 -        packageId := eachPackageToFileout asPackageId.
   1.141 -        packageModule := packageId module.
   1.142 -        packageDirectory := packageId directory.
   1.143 -        packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   1.144 -
   1.145 -        packageDef := packageId projectDefinitionClass.
   1.146 -        libraryName := packageDef libraryName.
   1.147 -
   1.148 -        "/ mhmh - take them from my tree or from the projects/smalltalk execution directory ??
   1.149 -        dllSourceDir := myTopDirectory / packageModule / packageDirectory.
   1.150 -        OperatingSystem isMSWINDOWSlike ifTrue:[
   1.151 -"/            dllRelativePath := 'objvc','/',(libraryName,'.dll').
   1.152 -"/            (dllSourceDir / dllRelativePath) exists 
   1.153 -            false ifFalse:[
   1.154 -                dllRelativePath := 'objbc','/',(libraryName,'.dll').
   1.155 -            ]
   1.156 -        ] ifFalse:[
   1.157 -            dllRelativePath := libraryName,'.so'.
   1.158 -        ].
   1.159 -        ((packageTargetDir / dllRelativePath) exists
   1.160 -        and:[ (dllSourceDir / dllRelativePath) fileSize = (packageTargetDir / dllRelativePath) fileSize
   1.161 -        and:[ (dllSourceDir / dllRelativePath) modificationTime < (packageTargetDir / dllRelativePath) modificationTime
   1.162 -        "/ and:[ (dllSourceDir / dllRelativePath) sameContentsAs:(packageTargetDir / dllRelativePath) ]
   1.163 -        ]]) ifFalse:[
   1.164 -            (packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
   1.165 +(packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
   1.166              (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).    
   1.167          ]
   1.168      ].
   1.169  !
   1.170  
   1.171 -copyDirectory:relativepath
   1.172 +tory:relativepath
   1.173      "/ need rules in stx
   1.174      ((Smalltalk projectDirectoryForPackage:'stx') asFilename construct:relativepath)
   1.175          recursiveCopyTo:(buildDirectory construct:'stx').
   1.176  !
   1.177  
   1.178 -copyDirectoryForBuild:subdir
   1.179 -    |targetDir targetFile|
   1.180 -
   1.181 -    targetDir := buildDirectory / 'stx' / subdir.
   1.182 -    targetDir exists ifFalse:[
   1.183 -        targetDir makeDirectory.
   1.184 -    ].
   1.185 -    (mySTXTopDirectory / subdir) directoryContentsAsFilenamesDo:[:eachFile |
   1.186 -        eachFile isDirectory ifFalse:[
   1.187 -            targetFile := targetDir / eachFile baseName.
   1.188 -            (targetFile exists not
   1.189 -            or:[ targetFile modificationTime < eachFile modificationTime ]) ifTrue:[
   1.190 -                self activityNotification:'copying ',eachFile pathName,'...'.
   1.191 +ification:'copying ',eachFile pathName,'...'.
   1.192                  eachFile copyTo:(targetDir construct:eachFile baseName)
   1.193              ]
   1.194          ].
   1.195 @@ -233,41 +151,13 @@
   1.196      self activityNotification:nil
   1.197  !
   1.198  
   1.199 -copyResourcesForPackage:aPackage
   1.200 -    |module directory|
   1.201 -
   1.202 -    module := aPackage asPackageId module.
   1.203 -    directory := aPackage asPackageId directory.
   1.204 -
   1.205 -    (myTopDirectory / module / directory / 'resources' ) exists ifTrue:[
   1.206 -        (myTopDirectory / module / directory / 'resources' )
   1.207 -            recursiveCopyTo:(buildDirectory / module / directory)
   1.208 -    ].
   1.209 -    (myTopDirectory / module / directory / 'styles' ) exists ifTrue:[
   1.210 +tory / module / directory / 'styles' ) exists ifTrue:[
   1.211          (myTopDirectory / module / directory / 'styles' )
   1.212              recursiveCopyTo:(buildDirectory / module / directory)
   1.213      ].
   1.214  !
   1.215  
   1.216 -copySTCDirectoryForBuild
   1.217 -    |targetDir stc files|
   1.218 -
   1.219 -    targetDir := buildDirectory / 'stx' / 'stc'.
   1.220 -    targetDir exists ifFalse:[ targetDir makeDirectory ].
   1.221 -
   1.222 -    stc := OperatingSystem isMSWINDOWSlike 
   1.223 -                ifTrue:[ 'stc.exe' ]
   1.224 -                ifFalse:[ 'stc' ].
   1.225 -
   1.226 -    files := #( ) copyWith:stc.
   1.227 -
   1.228 -    files do:[:eachFile |
   1.229 -        |sourceFile targetFile|
   1.230 -
   1.231 -        sourceFile := mySTXTopDirectory / 'stc' / eachFile.
   1.232 -        targetFile := targetDir / eachFile.
   1.233 -        (targetFile exists not
   1.234 -        or:[ targetFile modificationTime < sourceFile modificationTime ]) ifTrue:[
   1.235 +me ]) ifTrue:[
   1.236              self activityNotification:'copying ',sourceFile pathName,'...'.
   1.237              sourceFile copyTo:targetFile
   1.238          ].
   1.239 @@ -275,119 +165,27 @@
   1.240      self activityNotification:nil
   1.241  !
   1.242  
   1.243 -copyStartupFilesFromSmalltalk
   1.244 -    (buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[
   1.245 -        (buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory.
   1.246 -    ].
   1.247 -
   1.248 -    #( 'keyboard.rc' 'keyboardMacros.rc' 'display.rc' 'd_win32.rc'
   1.249 -       'host.rc' 'h_win32.rc'  
   1.250 +'host.rc' 'h_win32.rc'  
   1.251      ) do:[:fn |
   1.252          (myTopDirectory / 'stx' / 'projects/smalltalk' / fn)
   1.253              copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / fn)
   1.254      ]
   1.255  !
   1.256  
   1.257 -copySupportFilesForLinkage
   1.258 -    |files|
   1.259 -
   1.260 -    OperatingSystem isMSWINDOWSlike ifTrue:[
   1.261 -        files := #( 
   1.262 -                    'support/win32/borland/cs3245.dll' 
   1.263 -                    'support/win32/X11.dll'
   1.264 -                    'support/win32/Xext.dll'
   1.265 -                    'librun/librun.dll'
   1.266 -                    'libbc/librun.lib'
   1.267 -                    'libbc/cs32i.lib'
   1.268 -                    'librun/genDate.exe'
   1.269 -                    'librun/main.c'
   1.270 -                 ).
   1.271 -    ] ifFalse:[
   1.272 -        files := #(
   1.273 -                    'librun/genDate'
   1.274 -                    'librun/main.c'
   1.275 -                    'librun/librun.so'
   1.276 -                )
   1.277 -    ].
   1.278 -
   1.279 -    files do:[:dllRelativePath |
   1.280 -        ((buildDirectory / 'stx' / dllRelativePath) exists
   1.281 -        and:[ (mySTXTopDirectory / dllRelativePath) fileSize = (buildDirectory / 'stx' / dllRelativePath) fileSize
   1.282 -        and:[ (mySTXTopDirectory / dllRelativePath) modificationTime < (buildDirectory / 'stx' / dllRelativePath) modificationTime
   1.283 -        "/ and:[ (mySTXTopDirectory / dllRelativePath) sameContentsAs:(targetBuildDir / dllRelativePath) ]
   1.284 -        ]]) ifFalse:[
   1.285 -            (buildDirectory / 'stx' / dllRelativePath) directory recursiveMakeDirectory.
   1.286 +ry / 'stx' / dllRelativePath) directory recursiveMakeDirectory.
   1.287              (mySTXTopDirectory / dllRelativePath) copyTo:(buildDirectory / 'stx' / dllRelativePath).    
   1.288          ]
   1.289      ].
   1.290  !
   1.291  
   1.292 -createHeaderFileFor:aClass in:packageTargetDir
   1.293 -    |instVarList classInstVarList classVarList bindings superclassFilename
   1.294 -     template file newContents oldContents|
   1.295 -
   1.296 -    instVarList := StringCollection new.
   1.297 -    aClass instVarNames do:[:v |
   1.298 -        instVarList add:('OBJ %1;' bindWith:v)
   1.299 -    ].
   1.300 -    classInstVarList := StringCollection new.
   1.301 -    aClass class instVarNames do:[:v |
   1.302 -(v includes:$_) ifTrue:[self halt].
   1.303 -        classInstVarList add:('OBJ %1;' bindWith:v)
   1.304 -    ].
   1.305 -    classVarList := StringCollection new.
   1.306 -    aClass classVarNames do:[:v |
   1.307 -        classVarList add:('extern OBJ %1_%2;' bindWith:aClass name with:v)
   1.308 -    ].
   1.309 -
   1.310 -    bindings := Dictionary new.
   1.311 -    bindings at:'ClassName' put:aClass name. 
   1.312 -    aClass superclass isNil ifTrue:[
   1.313 -        bindings at:'SuperclassName' put:'-'. 
   1.314 -        bindings at:'SuperclassFileInclude' put:nil.
   1.315 -    ] ifFalse:[
   1.316 -        bindings at:'SuperclassName' put:aClass superclass name. 
   1.317 -        bindings at:'SuperclassFileName' put:(superclassFilename := Smalltalk fileNameForClass:aClass superclass).
   1.318 -        bindings at:'SuperclassFileInclude' put:('#include "%1.STH"' bindWith:superclassFilename).
   1.319 -    ].
   1.320 -    bindings at:'InstVarList' put:instVarList asString. 
   1.321 -    bindings at:'ClassVarList' put:classVarList asString. 
   1.322 -    bindings at:'ClassInstVarList' put:classInstVarList asString. 
   1.323 -
   1.324 -    template := 
   1.325 -'/* This file was generated by ProjectBuilder. */
   1.326 -/* !!!!!!!! Do not change by hand !!!!!!!! */
   1.327 -
   1.328 -/* Class: %(ClassName) */
   1.329 -/* Superclass: %(SuperclassName) */
   1.330 -
   1.331 -%(SuperclassFileInclude)
   1.332 -
   1.333 -/* INDIRECTGLOBALS */
   1.334 -#ifdef _HEADER_INST_
   1.335 -%(InstVarList)
   1.336 -#endif /* _HEADER_INST_ */
   1.337 -
   1.338 -#ifdef _HEADER_CLASS_
   1.339 -%(ClassVarList)
   1.340 -#endif /* _HEADER_CLASS_ */
   1.341 -
   1.342 -#ifdef _HEADER_CLASSINST_
   1.343 -%(ClassInstVarList)
   1.344 -#endif /* _HEADER_CLASSINST_ */
   1.345 -'.
   1.346 -    newContents := template bindWithArguments:bindings.
   1.347 -    file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),'.STH').
   1.348 +ename / ((Smalltalk fileNameForClass:aClass),'.STH').
   1.349      (file exists not
   1.350      or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[
   1.351          file contents: newContents.
   1.352      ].
   1.353  !
   1.354  
   1.355 -generateSourceFiles
   1.356 -    sourceCodeManager notNil ifTrue:[
   1.357 -        "/ check out / generate files there
   1.358 -        self generateSourceFilesByCheckingOutUsing:sourceCodeManager
   1.359 +self generateSourceFilesByCheckingOutUsing:sourceCodeManager
   1.360      ] ifFalse:[
   1.361          "/ local build
   1.362          "/ fileout the project
   1.363 @@ -395,40 +193,7 @@
   1.364      ]
   1.365  !
   1.366  
   1.367 -generateSourceFilesByCheckingOutUsing:aSourceCodeManager
   1.368 -    "/ will no longer be needed/supported
   1.369 -
   1.370 -    |repository stxRepository module directory|
   1.371 -
   1.372 -self halt.
   1.373 -    "/ check out / generate files there
   1.374 -    repository := (aSourceCodeManager repositoryNameForModule:module) ifNil:[aSourceCodeManager repositoryName].
   1.375 -    stxRepository := aSourceCodeManager repositoryName.
   1.376 -
   1.377 -    (buildDirectory construct:'stx') exists ifFalse:[
   1.378 -        (module ~= 'stx') ifTrue:[
   1.379 -            OperatingSystem
   1.380 -                executeCommand:('cvs -d ',stxRepository,' co stx')
   1.381 -                inputFrom:nil
   1.382 -                outputTo:Transcript
   1.383 -                errorTo:Transcript
   1.384 -                inDirectory:buildDirectory
   1.385 -                onError:[:status| self error:'cvs update stx failed'].
   1.386 -        ].
   1.387 -    ].
   1.388 -
   1.389 -    ((buildDirectory construct:module) construct:'CVS') exists ifFalse:[
   1.390 -        OperatingSystem
   1.391 -            executeCommand:('cvs -d ',repository,' co -l ',directory)
   1.392 -            inputFrom:nil
   1.393 -            outputTo:Transcript
   1.394 -            errorTo:Transcript
   1.395 -            inDirectory:buildDirectory
   1.396 -            onError:[:status| self error:'cvs update failed'].
   1.397 -    ].
   1.398 -    OperatingSystem
   1.399 -        executeCommand:'cvs upd -d'
   1.400 -        inputFrom:nil
   1.401 +:nil
   1.402          outputTo:Transcript
   1.403          errorTo:Transcript
   1.404          inDirectory:(buildDirectory construct:module)
   1.405 @@ -436,80 +201,7 @@
   1.406  self halt.
   1.407  !
   1.408  
   1.409 -generateSourceFilesByFilingOut
   1.410 -    "/ local build
   1.411 -    "/ fileout the project
   1.412 -
   1.413 -    (package module ~= 'stx') ifTrue:[
   1.414 -        (buildDirectory / package module) makeDirectory.
   1.415 -    ].
   1.416 -
   1.417 -    "/ file out the package(s) which are to be built
   1.418 -    ((Array with:package))
   1.419 -    do:[:eachPackageToFileout |
   1.420 -        |packageId packageModule packageDirectory packageTargetDir packageDef|
   1.421 -
   1.422 -        packageId := eachPackageToFileout asPackageId.
   1.423 -        packageModule := packageId module.
   1.424 -        packageDirectory := packageId directory.
   1.425 -        packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   1.426 -
   1.427 -        packageDef := packageId projectDefinitionClass.
   1.428 -        (packageDef compiled_classNames_common ,
   1.429 -        packageDef compiled_classNamesForPlatform) do:[:eachClassName |
   1.430 -            |cls fileName newSource|
   1.431 -
   1.432 -            cls := Smalltalk classNamed:eachClassName.
   1.433 -            self assert:cls isLoaded.
   1.434 -            fileName := (Smalltalk fileNameForClass:cls),'.st'.
   1.435 -            fileName := packageTargetDir asFilename construct:fileName.
   1.436 -            fileName exists ifTrue:[
   1.437 -                newSource := String streamContents:[:s | cls fileOutOn:s withTimeStamp:false].
   1.438 -                newSource = fileName contentsAsString ifFalse:[
   1.439 -                    fileName contents:newSource
   1.440 -                ].
   1.441 -            ] ifFalse:[
   1.442 -                cls fileOutIn:packageTargetDir withTimeStamp:false
   1.443 -            ].
   1.444 -        ].
   1.445 -
   1.446 -"/        (Smalltalk allClassesInPackage:eachPackageToFileout) do:[:cls |
   1.447 -"/            cls isPrivate ifFalse:[
   1.448 -"/                cls isLoaded ifFalse:[
   1.449 -"/                    self halt.
   1.450 -"/                    cls autoload.
   1.451 -"/                ].
   1.452 -"/                cls fileOutIn:packageTargetDir
   1.453 -"/            ]
   1.454 -"/        ].
   1.455 -
   1.456 -        projectDefinitionClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents |
   1.457 -            ((packageTargetDir / fileName) exists
   1.458 -            and:[ (packageTargetDir / fileName) contents = fileContents ]) ifFalse:[
   1.459 -                (packageTargetDir / fileName) contents:fileContents.
   1.460 -            ].
   1.461 -        ].    
   1.462 -    ].
   1.463 -
   1.464 -    "/ generate header files in prerequisite packages...
   1.465 -    (projectDefinitionClass allPreRequisites)
   1.466 -    do:[:eachPackageToFileout |
   1.467 -        |packageId packageDef packageModule packageDirectory packageTargetDir|
   1.468 -
   1.469 -        packageId := eachPackageToFileout asPackageId.
   1.470 -        packageModule := packageId module.
   1.471 -        packageDirectory := packageId directory.
   1.472 -        packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   1.473 -
   1.474 -        packageDef := packageId projectDefinitionClass.
   1.475 -        (packageDef compiled_classNames_common ,
   1.476 -        packageDef compiled_classNamesForPlatform) do:[:eachClassName |
   1.477 -            |cls|
   1.478 -
   1.479 -            cls := Smalltalk classNamed:eachClassName.
   1.480 -            "/ self assert:cls isLoaded.
   1.481 -            cls isLoaded ifTrue:[    
   1.482 -                self createHeaderFileFor:cls in:packageTargetDir
   1.483 +or:cls in:packageTargetDir
   1.484              ].
   1.485          ].
   1.486          self copyResourcesForPackage:eachPackageToFileout.
   1.487 @@ -518,32 +210,7 @@
   1.488  "/    stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
   1.489  !
   1.490  
   1.491 -makeWithOutputTo:stdOut errorTo:stdErr
   1.492 -    |module directory|
   1.493 -
   1.494 -    module := package module.
   1.495 -    directory := package directory.
   1.496 -
   1.497 -    projectDefinitionClass isLibraryDefinition ifTrue:[
   1.498 -        OperatingSystem
   1.499 -            executeCommand:(ParserFlags makeCommand,' classLibRule')
   1.500 -            inputFrom:nil
   1.501 -            outputTo:stdOut
   1.502 -            errorTo:stdErr
   1.503 -            inDirectory:(buildDirectory / module / directory)
   1.504 -            onError:[:status| self error:'make failed'].
   1.505 -    ] ifFalse:[
   1.506 -        OperatingSystem
   1.507 -            executeCommand:(ParserFlags makeCommand,' exe')
   1.508 -            inputFrom:nil
   1.509 -            outputTo:stdOut
   1.510 -            errorTo:stdErr
   1.511 -            inDirectory:(buildDirectory / module / directory)
   1.512 -            onError:[:status| self error:'make failed'].
   1.513 -
   1.514 -        OperatingSystem
   1.515 -            executeCommand:(ParserFlags makeCommand,' setup')
   1.516 -            inputFrom:nil
   1.517 +nil
   1.518              outputTo:stdOut
   1.519              errorTo:stdErr
   1.520              inDirectory:(buildDirectory / module / directory)
   1.521 @@ -551,57 +218,12 @@
   1.522      ]
   1.523  !
   1.524  
   1.525 -setupBuildDirectory
   1.526 -    buildDirectory exists ifFalse:[
   1.527 -        buildDirectory recursiveMakeDirectory.
   1.528 -    ].
   1.529 -    (buildDirectory / 'stx') exists ifFalse:[
   1.530 +(buildDirectory / 'stx') exists ifFalse:[
   1.531          (buildDirectory / 'stx') makeDirectory.
   1.532      ].
   1.533  
   1.534      self copyDirectoryForBuild:'include'.
   1.535      self copyDirectoryForBuild:'rules'.
   1.536 -!
   1.537 -
   1.538 -validateBuildDirectoryIsPresent
   1.539 -
   1.540 -    ^ self.
   1.541 -
   1.542 -"/    [
   1.543 -"/        |default directoryIsOKForMe stc |
   1.544 -"/
   1.545 -"/        default := (buildDirectory ?
   1.546 -"/                          PreviousBuildDirectory)
   1.547 -"/                          ifNil:[ UserPreferences current buildDirectory].
   1.548 -"/
   1.549 -"/        buildDirectory := Dialog requestDirectoryName:'Temporary Work-ROOT for build:'
   1.550 -"/                                 default:default.
   1.551 -"/
   1.552 -"/        buildDirectory isEmptyOrNil ifTrue:[^ self].
   1.553 -"/        buildDirectory := buildDirectory asFilename.
   1.554 -"/        directoryIsOKForMe := true.
   1.555 -"/
   1.556 -"/        buildDirectory exists ifFalse:[
   1.557 -"/            Dialog warn:(self classResources string:'Work directory %1 does not exist.' with:buildDirectory).
   1.558 -"/            directoryIsOKForMe := false.
   1.559 -"/        ] ifTrue:[
   1.560 -"/            (buildDirectory construct:'stx') exists ifFalse:[
   1.561 -"/                Dialog warn:(self classResources stringWithCRs:'Work directory must contain an stx subDirectory,\which contains (at least) the stc and include subdirectories.').
   1.562 -"/                directoryIsOKForMe := false.
   1.563 -"/            ] ifTrue:[
   1.564 -"/                stc := (OperatingSystem isMSDOSlike) ifTrue:['stc.exe'] ifFalse:['stc'].
   1.565 -"/                (((buildDirectory construct:'stx')construct:'stc')construct:stc) exists ifFalse:[
   1.566 -"/                    Dialog warn:(self classResources stringWithCRs:'Work directory must contain an stc compiler in the stx/stc subDirectory.').
   1.567 -"/                    directoryIsOKForMe := false.
   1.568 -"/                ].
   1.569 -"/                ((buildDirectory construct:'stx')construct:'include') exists ifFalse:[
   1.570 -"/                    Dialog warn:(self classResources stringWithCRs:'Work directory must have had a make run before (for include files to exists).').
   1.571 -"/                    directoryIsOKForMe := false.
   1.572 -"/                ].
   1.573 -"/            ]
   1.574 -"/        ].
   1.575 -"/        directoryIsOKForMe
   1.576 -"/    ] whileFalse
   1.577  ! !
   1.578  
   1.579  !ProjectBuilder class methodsFor:'documentation'!