ProjectBuilder.st
changeset 2852 a3007ba3b216
parent 2845 0d52c66fbc8e
child 2861 b8c6e02e60a1
equal deleted inserted replaced
2851:860e0292c5ce 2852:a3007ba3b216
   442 
   442 
   443     bindings := Dictionary new.
   443     bindings := Dictionary new.
   444     bindings at:'ClassName' put:aClass name. 
   444     bindings at:'ClassName' put:aClass name. 
   445     aClass superclass isNil ifTrue:[
   445     aClass superclass isNil ifTrue:[
   446         bindings at:'SuperclassName' put:'-'. 
   446         bindings at:'SuperclassName' put:'-'. 
   447         bindings at:'SuperclassFileInclude' put:nil.
   447         bindings at:'SuperclassFileInclude' put:''.
   448     ] ifFalse:[
   448     ] ifFalse:[
   449         bindings at:'SuperclassName' put:aClass superclass name. 
   449         bindings at:'SuperclassName' put:aClass superclass name. 
   450         bindings at:'SuperclassFileName' put:(superclassFilename := Smalltalk fileNameForClass:aClass superclass).
   450         bindings at:'SuperclassFileName' put:(superclassFilename := Smalltalk fileNameForClass:aClass superclass).
   451         bindings at:'SuperclassFileInclude' put:('#include "%1.STH"' bindWith:superclassFilename).
   451         bindings at:'SuperclassFileInclude' put:('#include "%1.STH"' bindWith:superclassFilename).
   452     ].
   452     ].
   480     file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),(self suffixForHeaderFiles)).
   480     file := packageTargetDir asFilename / ((Smalltalk fileNameForClass:aClass),(self suffixForHeaderFiles)).
   481     (file exists not
   481     (file exists not
   482     or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[
   482     or:[ (oldContents := file contents) ~= newContents ]) ifTrue:[
   483         file contents: newContents.
   483         file contents: newContents.
   484     ].
   484     ].
       
   485 
       
   486     "Modified: / 15-08-2011 / 14:58:46 / cg"
   485 !
   487 !
   486 
   488 
   487 generateSourceFiles
   489 generateSourceFiles
   488     sourceCodeManager notNil ifTrue:[
   490     sourceCodeManager notNil ifTrue:[
   489         "/ check out / generate files there
   491         "/ check out / generate files there
   633 
   635 
   634     makeCommand := ParserFlags makeCommand.
   636     makeCommand := ParserFlags makeCommand.
   635     usedCompiler = 'vc' ifTrue:[ makeCommand := 'vcmake'. compilerFlag := '-DUSEVC' ].
   637     usedCompiler = 'vc' ifTrue:[ makeCommand := 'vcmake'. compilerFlag := '-DUSEVC' ].
   636     usedCompiler = 'lcc' ifTrue:[ makeCommand := 'lcmake'. compilerFlag := '-DUSELCC' ].
   638     usedCompiler = 'lcc' ifTrue:[ makeCommand := 'lcmake'. compilerFlag := '-DUSELCC' ].
   637     usedCompiler = 'gcc' ifTrue:[ makeCommand := 'make'. ].
   639     usedCompiler = 'gcc' ifTrue:[ makeCommand := 'make'. ].
   638     makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
   640     "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName.
   639 
   641 
   640     OperatingSystem isUNIXlike ifTrue:[
   642     OperatingSystem isUNIXlike ifTrue:[
   641         OperatingSystem
   643         OperatingSystem
   642             executeCommand:('sh %1/rules/stmkmf' bindWith:mySTXTopDirectory pathName)
   644             executeCommand:('sh %1/rules/stmkmf' bindWith:mySTXTopDirectory pathName)
   643             inputFrom:nil
   645             inputFrom:nil
   673                 inDirectory:(buildDirectory / module / directory)
   675                 inDirectory:(buildDirectory / module / directory)
   674                 onError:[:status| self error:'make failed'].
   676                 onError:[:status| self error:'make failed'].
   675         ]
   677         ]
   676     ]
   678     ]
   677 
   679 
   678     "Modified: / 26-07-2010 / 12:25:33 / cg"
   680     "Modified: / 15-08-2011 / 14:49:21 / cg"
   679 !
   681 !
   680 
   682 
   681 recursiveCopyDirectoryForBuild:subdir
   683 recursiveCopyDirectoryForBuild:subdir
   682     |targetDir|
   684     |targetDir|
   683 
   685