ProjectBuilder.st
changeset 3308 5cbec72e27fa
parent 3307 58f20c91f623
child 3321 08f3a7af6975
equal deleted inserted replaced
3307:58f20c91f623 3308:5cbec72e27fa
   271 
   271 
   272     |module directory|
   272     |module directory|
   273 
   273 
   274     usedCompiler isNil ifTrue:[
   274     usedCompiler isNil ifTrue:[
   275         usedCompiler := ParserFlags usedCompiler.
   275         usedCompiler := ParserFlags usedCompiler.
       
   276         usedCompiler isNil ifTrue:[ self error:'no compiler defined (settings)'. ].
   276     ].
   277     ].
   277 
   278 
   278     projectDefinitionClass := ProjectDefinition definitionClassForPackage:package.
   279     projectDefinitionClass := ProjectDefinition definitionClassForPackage:package.
   279     projectDefinitionClass isNil ifTrue:[
   280     projectDefinitionClass isNil ifTrue:[
   280         self error:('Missing ProjectDefinition class for "',package asString,'"')
   281         self error:('Missing ProjectDefinition class for "',package asString,'"')
   325         self activityNotification:'Generating stc directory...'.
   326         self activityNotification:'Generating stc directory...'.
   326         self copySTCDirectoryForBuild.
   327         self copySTCDirectoryForBuild.
   327     ].
   328     ].
   328     self activityNotification:'Generating source files...'.
   329     self activityNotification:'Generating source files...'.
   329     self generateSourceFiles.
   330     self generateSourceFiles.
   330     self makeQuick ifFalse:[
   331     false "self makeQuick" ifFalse:[
   331         self activityNotification:'Copying dlls for linkage...'.
   332         self activityNotification:'Copying dlls for linkage...'.
   332         self copyDLLsForLinkage.
   333         self copyDLLsForLinkage.
   333         self activityNotification:'Copying support files for compilation and linkage...'.
   334         self activityNotification:'Copying support files for compilation and linkage...'.
   334         self copySupportFilesForCompilation.
   335         self copySupportFilesForCompilation.
   335         self copySupportFilesForLinkage.
   336         self copySupportFilesForLinkage.
   336         self copyStartupFilesFromSmalltalk.
   337         self copyStartupFilesFromSmalltalk.
   337     ].
   338     ].
   338     self activityNotification:'Executing make...'.
       
   339     self makeWithOutputTo:stdOut errorTo:stdErr.
   339     self makeWithOutputTo:stdOut errorTo:stdErr.
   340 
   340 
   341     "Modified: / 06-06-2016 / 12:13:01 / cg"
   341     "Modified: / 06-06-2016 / 15:16:28 / cg"
   342 ! !
   342 ! !
   343 
   343 
   344 !ProjectBuilder methodsFor:'building/private'!
   344 !ProjectBuilder methodsFor:'building/private'!
   345 
   345 
   346 copyDLLsForLinkage
   346 copyDLLsForLinkage
   932 
   932 
   933 "/    stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
   933 "/    stx_libbasic2 preRequisitesForBuilding#(#'stx:libbasic')
   934 !
   934 !
   935 
   935 
   936 makeCommandOfCompiler:usedCompiler
   936 makeCommandOfCompiler:usedCompiler
   937     usedCompiler = 'bcc' ifTrue:[ 
   937     usedCompiler notNil ifTrue:[
   938         ^ 'bmake'.
   938         usedCompiler = 'bcc' ifTrue:[ 
   939     ].
   939             ^ 'bmake'.
   940     usedCompiler = 'vc' ifTrue:[ 
   940         ].
   941         ^ 'vcmake'. "/ compilerFlag := '-DUSEVC' 
   941         usedCompiler = 'vc' ifTrue:[ 
   942     ].
   942             ^ 'vcmake'. "/ compilerFlag := '-DUSEVC' 
   943     usedCompiler = 'lcc' ifTrue:[ 
   943         ].
   944         ^ 'lccmake'. "/ compilerFlag := '-DUSELCC' 
   944         usedCompiler = 'lcc' ifTrue:[ 
   945     ].
   945             ^ 'lccmake'. "/ compilerFlag := '-DUSELCC' 
   946     usedCompiler = 'tcc' ifTrue:[ 
   946         ].
   947         ^ 'tccmake'. "/ compilerFlag := '-DUSELCC' 
   947         usedCompiler = 'tcc' ifTrue:[ 
   948     ].
   948             ^ 'tccmake'. "/ compilerFlag := '-DUSELCC' 
   949     usedCompiler = 'mingw' ifTrue:[ 
   949         ].
   950         ^ 'mingwmake'.  "/ compilerFlag := '-DUSEMINGW' 
   950         usedCompiler = 'mingw' ifTrue:[ 
   951     ].
   951             ^ 'mingwmake'.  "/ compilerFlag := '-DUSEMINGW' 
   952     true "usedCompiler = 'gcc'" ifTrue:[ 
   952         ].
   953         ^ 'make'.       "/ compilerFlag := '-DUSEGCC' 
   953         true "usedCompiler = 'gcc'" ifTrue:[ 
       
   954             ^ 'make'.       "/ compilerFlag := '-DUSEGCC' 
       
   955         ].
   954     ].
   956     ].
   955     self error:'unknown compiler specified'.
   957     self error:'unknown compiler specified'.
   956 
   958 
   957     "Created: / 03-09-2012 / 19:46:07 / cg"
   959     "Created: / 03-09-2012 / 19:46:07 / cg"
       
   960     "Modified: / 06-06-2016 / 15:11:54 / cg"
   958 !
   961 !
   959 
   962 
   960 makeWithOutputTo:stdOut errorTo:stdErr
   963 makeWithOutputTo:stdOut errorTo:stdErr
   961     |module directory makeCommand forceArg makeTarget|
   964     |module directory makeCommand forceArg makeTarget|
   962 
   965 
   963     module := package module.
   966     module := package module.
   964     directory := package directory.
   967     directory := package directory.
   965 
   968 
   966     makeCommand := ParserFlags makeCommand.
   969     "/ makeCommand := ParserFlags makeCommand.
   967     usedCompiler isNil ifTrue:[
   970     usedCompiler isNil ifTrue:[
   968         usedCompiler := ParserFlags usedCompiler.
   971         usedCompiler := ParserFlags usedCompiler.
       
   972         usedCompiler isNil ifTrue:[ self error:'no compiler defined (settings)'. ].
   969     ].
   973     ].
   970     makeCommand := self makeCommandOfCompiler:usedCompiler.
   974     makeCommand := self makeCommandOfCompiler:usedCompiler.
       
   975     self activityNotification:'Executing make... (',makeCommand,')'.
   971     forceArg := ''.
   976     forceArg := ''.
   972     
   977     
   973     "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
   978     "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
   974 
   979 
   975     OperatingSystem isUNIXlike ifTrue:[
   980     OperatingSystem isUNIXlike ifTrue:[
  1017                 inDirectory:(buildDirectory / module / directory)
  1022                 inDirectory:(buildDirectory / module / directory)
  1018                 onError:[:status | self error:'make failed'].
  1023                 onError:[:status | self error:'make failed'].
  1019         ]
  1024         ]
  1020     ]
  1025     ]
  1021 
  1026 
  1022     "Modified: / 28-01-2014 / 21:48:07 / cg"
  1027     "Modified: / 06-06-2016 / 15:17:00 / cg"
  1023 !
  1028 !
  1024 
  1029 
  1025 objDirForUsedCompiler
  1030 objDirForUsedCompiler
  1026     ^ self objDirForUsedCompiler:usedCompiler
  1031     ^ self objDirForUsedCompiler:usedCompiler
  1027 
  1032