mingw build (unfinished)
authorClaus Gittinger <cg@exept.de>
Mon, 11 Mar 2013 21:09:28 +0100
changeset 29727db782e25d01
parent 2971 e10937c35748
child 2973 39b101cb0e93
mingw build (unfinished)
ProjectBuilder.st
     1.1 --- a/ProjectBuilder.st	Mon Mar 11 20:20:35 2013 +0100
     1.2 +++ b/ProjectBuilder.st	Mon Mar 11 21:09:28 2013 +0100
     1.3 @@ -16,7 +16,8 @@
     1.4  Object subclass:#ProjectBuilder
     1.5  	instanceVariableNames:'package projectDefinitionClass sourceCodeManager buildDirectory
     1.6  		myWorkingDirectory mySTXTopDirectory myTopDirectory outputStream
     1.7 -		makeExeOnly usedCompiler stdOut stdErr isQuickBuild isLocalBuild'
     1.8 +		makeExeOnly makeQuick usedCompiler stdOut stdErr isQuickBuild
     1.9 +		isLocalBuild'
    1.10  	classVariableNames:'PreviousBuildDirectory'
    1.11  	poolDictionaries:''
    1.12  	category:'System-Support-Projects'
    1.13 @@ -100,7 +101,7 @@
    1.14                  'mingw' "/ experimental; free
    1.15               )
    1.16          ].
    1.17 -        ^ #('bcc' 'vc' "'lcc' 'mingw'" )
    1.18 +        ^ #('bcc' 'vc' 'mingw' )
    1.19      ].
    1.20      ^ #('gcc')
    1.21  
    1.22 @@ -164,10 +165,22 @@
    1.23      isQuickBuild := aBoolean.
    1.24  !
    1.25  
    1.26 +makeExeOnly
    1.27 +    ^ (makeExeOnly ? false)
    1.28 +!
    1.29 +
    1.30  makeExeOnly:aBoolean
    1.31      makeExeOnly := aBoolean.
    1.32  !
    1.33  
    1.34 +makeQuick
    1.35 +    ^ (makeQuick ? false)
    1.36 +!
    1.37 +
    1.38 +makeQuick:aBoolean
    1.39 +    makeQuick := aBoolean.
    1.40 +!
    1.41 +
    1.42  package:aPackageIDOrSymbol
    1.43      package := aPackageIDOrSymbol asPackageId.
    1.44  !
    1.45 @@ -299,18 +312,21 @@
    1.46      myTopDirectory := myTopDirectory asFilename.
    1.47      mySTXTopDirectory := myTopDirectory / 'stx'.
    1.48  
    1.49 -    self setupBuildDirectory.
    1.50 -    self activityNotification:'Generating stc directory...'.
    1.51 -    self copySTCDirectoryForBuild.
    1.52 +    self makeQuick ifFalse:[
    1.53 +        self setupBuildDirectory.
    1.54 +        self activityNotification:'Generating stc directory...'.
    1.55 +        self copySTCDirectoryForBuild.
    1.56 +    ].
    1.57      self activityNotification:'Generating source files...'.
    1.58      self generateSourceFiles.
    1.59 -    self activityNotification:'Copying dlls for linkage...'.
    1.60 -    self copyDLLsForLinkage.
    1.61 -    self activityNotification:'Copying support files for compilation and linkage...'.
    1.62 -    self copySupportFilesForCompilation.
    1.63 -    self copySupportFilesForLinkage.
    1.64 -    self copyStartupFilesFromSmalltalk.
    1.65 -
    1.66 +    self makeQuick ifFalse:[
    1.67 +        self activityNotification:'Copying dlls for linkage...'.
    1.68 +        self copyDLLsForLinkage.
    1.69 +        self activityNotification:'Copying support files for compilation and linkage...'.
    1.70 +        self copySupportFilesForCompilation.
    1.71 +        self copySupportFilesForLinkage.
    1.72 +        self copyStartupFilesFromSmalltalk.
    1.73 +    ].
    1.74      self activityNotification:'Executing make...'.
    1.75      self makeWithOutputTo:stdOut errorTo:stdErr.
    1.76  
    1.77 @@ -602,8 +618,8 @@
    1.78          ].
    1.79          usedCompiler = 'mingw' ifTrue:[
    1.80              files := files , #( 
    1.81 -                        'librun/objvc/librun.dll'   "/ linkage is against vc version!!
    1.82 -                        'lib/vc/librun.lib'
    1.83 +                        'librun/objmingw/librun.dll'   "/ linkage is against vc version!!
    1.84 +                        'lib/mingw/librun.lib'
    1.85                      ).
    1.86          ].
    1.87      ] ifFalse:[
    1.88 @@ -836,33 +852,34 @@
    1.89              ].
    1.90          ].    
    1.91      ].
    1.92 +    self makeQuick ifFalse:[
    1.93 +        "/ generate header files in prerequisite packages...
    1.94 +        (projectDefinitionClass allPreRequisites)
    1.95 +        do:[:eachPackageToFileout |
    1.96 +            |packageId packageDef packageModule packageDirectory packageTargetDir|
    1.97  
    1.98 -    "/ generate header files in prerequisite packages...
    1.99 -    (projectDefinitionClass allPreRequisites)
   1.100 -    do:[:eachPackageToFileout |
   1.101 -        |packageId packageDef packageModule packageDirectory packageTargetDir|
   1.102 +            packageId := eachPackageToFileout asPackageId.
   1.103 +            packageModule := packageId module.
   1.104 +            packageDirectory := packageId directory.
   1.105 +            packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   1.106  
   1.107 -        packageId := eachPackageToFileout asPackageId.
   1.108 -        packageModule := packageId module.
   1.109 -        packageDirectory := packageId directory.
   1.110 -        packageTargetDir := (buildDirectory / packageModule / packageDirectory) recursiveMakeDirectory.
   1.111 +            packageDef := packageId projectDefinitionClass.
   1.112 +            (packageDef compiled_classNames_common ,
   1.113 +            packageDef compiled_classNamesForPlatform) do:[:eachClassName |
   1.114 +                |cls|
   1.115  
   1.116 -        packageDef := packageId projectDefinitionClass.
   1.117 -        (packageDef compiled_classNames_common ,
   1.118 -        packageDef compiled_classNamesForPlatform) do:[:eachClassName |
   1.119 -            |cls|
   1.120 -
   1.121 -            cls := Smalltalk classNamed:eachClassName.
   1.122 -            "/ self assert:cls isLoaded.
   1.123 -            cls isNil ifTrue:[
   1.124 -                stdErr nextPutLine:('Missing class: ',eachClassName, ' (not present in system. Warning only:subclasses of it will not be compiled)').
   1.125 -            ] ifFalse:[
   1.126 -                cls isLoaded ifTrue:[    
   1.127 -                    self createHeaderFileFor:cls in:packageTargetDir
   1.128 -                ]
   1.129 +                cls := Smalltalk classNamed:eachClassName.
   1.130 +                "/ self assert:cls isLoaded.
   1.131 +                cls isNil ifTrue:[
   1.132 +                    stdErr nextPutLine:('Missing class: ',eachClassName, ' (not present in system. Warning only:subclasses of it will not be compiled)').
   1.133 +                ] ifFalse:[
   1.134 +                    cls isLoaded ifTrue:[    
   1.135 +                        self createHeaderFileFor:cls in:packageTargetDir
   1.136 +                    ]
   1.137 +                ].
   1.138              ].
   1.139 +            self copyResourcesForPackage:eachPackageToFileout.
   1.140          ].
   1.141 -        self copyResourcesForPackage:eachPackageToFileout.
   1.142      ].
   1.143  
   1.144  "/    stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
   1.145 @@ -929,7 +946,7 @@
   1.146              inDirectory:(buildDirectory / module / directory)
   1.147              onError:[:status | self error:'make failed'].
   1.148      ] ifFalse:[
   1.149 -        (makeExeOnly ? false) ifTrue:[
   1.150 +        (self makeExeOnly) ifTrue:[
   1.151              self activityNotification:(makeCommand,' exe').
   1.152              OperatingSystem
   1.153                  "/ generate the executable