ProjectBuilder.st
author Claus Gittinger <cg@exept.de>
Tue, 20 Oct 2009 21:51:54 +0200
changeset 2634 3f14301cec84
parent 2633 4a48f107431a
child 2635 8b62bd023558
permissions -rw-r--r--
added: #buildDirectory: changed: #buildWithOutputTo:errorTo:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:libtool2' }"
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
Object subclass:#ProjectBuilder
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
2598
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
     5
		myWorkingDirectory mySTXTopDirectory myTopDirectory'
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	classVariableNames:'PreviousBuildDirectory'
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
	poolDictionaries:''
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	category:'System-Support-Projects'
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
2633
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    12
!ProjectBuilder class methodsFor:'accessing'!
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    13
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    14
previousBuildDirectory
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    15
    ^ PreviousBuildDirectory
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    16
!
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    17
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    18
previousBuildDirectory:something
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    19
    PreviousBuildDirectory := something.
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    20
! !
Claus Gittinger <cg@exept.de>
parents: 2628
diff changeset
    21
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!ProjectBuilder class methodsFor:'examples'!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
2622
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    24
!
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    25
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    26
methodsFor:'examples'
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
! !
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
!ProjectBuilder methodsFor:'accessing'!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    31
x:clients/Demos/foxCalcApplication'.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    32
    builder build.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    33
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    34
    UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
2622
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    35
!
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    36
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    37
buildDirectory:something
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    38
    buildDirectory := something.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    39
!
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    40
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    41
uilder build.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    42
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    43
    UserPreferences fileBrowserClass openOnDirectory:builder packageBuildDirectory.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    44
!
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    45
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    46
kageBuildDirectory.
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
2622
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    49
packageBuildDirectory
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    50
    "the directoray, where the deployable binary is created (xxxSetup.exe)"
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    51
e55f43981463 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2614
diff changeset
    52
    ^ buildDirectory / (package asPackageId module) / (package asPackageId directory)
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
! !
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
!ProjectBuilder methodsFor:'building'!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    57
(package asPackageId module) / (package asPackageId directory)
2611
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
    58
!
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
    59
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
    60
buildWithOutputTo:stdOut errorTo:stdErr
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
    61
    "/ intermediate - this will move into a commonly used utility class
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
    62
    "/ (where all the project code support will be collected).
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
    63
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    |module directory|
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    projectDefinitionClass := ProjectDefinition definitionClassForPackage:package.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
    projectDefinitionClass isNil ifTrue:[
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
        self error:('Missing ProjectDefinition class for "',package asString,'"')
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
    ].
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    "/ ensure that everything is loaded...
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    projectDefinitionClass loadAsAutoloaded:false.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
    projectDefinitionClass loadExtensions.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    projectDefinitionClass loadAllClassesAsAutoloaded:false.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    module := package module.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    directory := package directory.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    buildDirectory isNil ifTrue:[
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    80
        buildDirectory := PreviousBuildDirectory ifNil:[ UserPreferences current buildDirectory ].
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    81
        buildDirectory isNil ifTrue:[
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    82
            buildDirectory := Filename tempDirectory construct:'stx_build'.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
    83
        ].
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    ].
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
    buildDirectory := buildDirectory asFilename.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
    "/ self validateBuildDirectoryIsPresent.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    PreviousBuildDirectory := buildDirectory.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    "/ UserPreferences current localBuild:true
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    UserPreferences current localBuild ifFalse:[
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
        SourceCodeManager notNil ifTrue:[
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
            sourceCodeManager := SourceCodeManagerUtilities sourceCodeManagerFor:projectDefinitionClass.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
        ]
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    ].
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
    sourceCodeManager := nil.
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
2598
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
    99
    myTopDirectory := 
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
        Smalltalk packagePath 
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
            detect:[:aPath |
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
                (aPath asFilename / 'stx' / 'include') exists
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
                and: [ (aPath asFilename / 'stx' / 'rules') exists ]]
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
            ifNone:nil.       
2598
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
   105
    myTopDirectory isNil ifTrue:[
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
   106
        self error:('Cannot figure out my top directory (where stx/include and stx/rules are)')
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   107
    ].
2598
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
   108
    myTopDirectory := myTopDirectory asFilename.
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
   109
    mySTXTopDirectory := myTopDirectory / 'stx'.
2613
b8d38caaa884 changed: #buildWithOutputTo:errorTo:
Claus Gittinger <cg@exept.de>
parents: 2612
diff changeset
   110
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    self setupBuildDirectory.
2628
57b363325368 changed:
Claus Gittinger <cg@exept.de>
parents: 2622
diff changeset
   112
    self activityNotification:'Generating stc directory...'.
2599
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
   113
    self copySTCDirectoryForBuild.
2628
57b363325368 changed:
Claus Gittinger <cg@exept.de>
parents: 2622
diff changeset
   114
    self activityNotification:'Generating source files...'.
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    self generateSourceFiles.
2628
57b363325368 changed:
Claus Gittinger <cg@exept.de>
parents: 2622
diff changeset
   116
    self activityNotification:'Generating dlls for linkage...'.
2600
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   117
    self copyDLLsForLinkage.
2628
57b363325368 changed:
Claus Gittinger <cg@exept.de>
parents: 2622
diff changeset
   118
    self activityNotification:'Generating support files for linkage...'.
2600
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   119
    self copySupportFilesForLinkage.
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   120
    self copyStartupFilesFromSmalltalk.
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
2628
57b363325368 changed:
Claus Gittinger <cg@exept.de>
parents: 2622
diff changeset
   122
    self activityNotification:'Executing make...'.
2611
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
   123
    self makeWithOutputTo:stdOut errorTo:stdErr.
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   126
...'.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   127
    self copySupportFilesForLinkage.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   128
    self copyStartupFilesFromSmalltalk.
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   129
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   130
    self activityNotification:'Executing make...'.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   131
    self makeWithOutputTo:stdOut errorTo:stdErr.
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   132
!
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   133
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   134
(packageTargetDir / dllRelativePath) directory recursiveMakeDirectory.
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   135
            (dllSourceDir / dllRelativePath) copyTo:(packageTargetDir / dllRelativePath).    
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   136
        ]
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   137
    ].
2600
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   138
!
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   139
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   140
tory:relativepath
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   141
    "/ need rules in stx
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   142
    ((Smalltalk projectDirectoryForPackage:'stx') asFilename construct:relativepath)
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   143
        recursiveCopyTo:(buildDirectory construct:'stx').
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   144
!
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   145
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   146
ification:'copying ',eachFile pathName,'...'.
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   147
                eachFile copyTo:(targetDir construct:eachFile baseName)
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   148
            ]
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   149
        ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   150
    ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   151
    self activityNotification:nil
2598
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
   152
!
2bb47a698d59 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2596
diff changeset
   153
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   154
tory / module / directory / 'styles' ) exists ifTrue:[
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   155
        (myTopDirectory / module / directory / 'styles' )
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   156
            recursiveCopyTo:(buildDirectory / module / directory)
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   157
    ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   158
!
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   159
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   160
me ]) ifTrue:[
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   161
            self activityNotification:'copying ',sourceFile pathName,'...'.
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   162
            sourceFile copyTo:targetFile
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   163
        ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   164
    ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   165
    self activityNotification:nil
2599
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
   166
!
Claus Gittinger <cg@exept.de>
parents: 2598
diff changeset
   167
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   168
'host.rc' 'h_win32.rc'  
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   169
    ) do:[:fn |
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   170
        (myTopDirectory / 'stx' / 'projects/smalltalk' / fn)
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   171
            copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / fn)
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   172
    ]
2600
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   173
!
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   174
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   175
ry / 'stx' / dllRelativePath) directory recursiveMakeDirectory.
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   176
            (mySTXTopDirectory / dllRelativePath) copyTo:(buildDirectory / 'stx' / dllRelativePath).    
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   177
        ]
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   178
    ].
2600
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   179
!
bfde5434dcdd added:5 methods
Claus Gittinger <cg@exept.de>
parents: 2599
diff changeset
   180
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   181
ename / ((Smalltalk fileNameForClass:aClass),'.STH').
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   182
    (file exists not
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   183
    or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   184
        file contents: newContents.
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   185
    ].
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   188
self generateSourceFilesByCheckingOutUsing:sourceCodeManager
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   189
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   190
        "/ local build
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   191
        "/ fileout the project
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   192
        self generateSourceFilesByFilingOut
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   193
    ]
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   196
:nil
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   197
        outputTo:Transcript
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   198
        errorTo:Transcript
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   199
        inDirectory:(buildDirectory construct:module)
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   200
        onError:[:status| self error:'cvs update failed'].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   201
self halt.
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   204
or:cls in:packageTargetDir
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   205
            ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   206
        ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   207
        self copyResourcesForPackage:eachPackageToFileout.
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   208
    ].
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   209
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   210
"/    stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   211
!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   213
nil
2612
2e735008a4d8 changed:
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   214
            outputTo:stdOut
2e735008a4d8 changed:
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   215
            errorTo:stdErr
2e735008a4d8 changed:
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   216
            inDirectory:(buildDirectory / module / directory)
2e735008a4d8 changed:
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   217
            onError:[:status| self error:'make failed'].
2e735008a4d8 changed:
Claus Gittinger <cg@exept.de>
parents: 2611
diff changeset
   218
    ]
2611
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
   219
!
Claus Gittinger <cg@exept.de>
parents: 2600
diff changeset
   220
2634
3f14301cec84 added: #buildDirectory:
Claus Gittinger <cg@exept.de>
parents: 2633
diff changeset
   221
(buildDirectory / 'stx') exists ifFalse:[
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   222
        (buildDirectory / 'stx') makeDirectory.
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   223
    ].
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
2614
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   225
    self copyDirectoryForBuild:'include'.
Claus Gittinger <cg@exept.de>
parents: 2613
diff changeset
   226
    self copyDirectoryForBuild:'rules'.
2596
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
! !
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   228
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   229
!ProjectBuilder class methodsFor:'documentation'!
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   230
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
version_CVS
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
    ^ '$Header$'
876679f78999 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
! !