246 self buildWithOutputTo:stdOut errorTo:stdErr. |
246 self buildWithOutputTo:stdOut errorTo:stdErr. |
247 |
247 |
248 "Modified: / 06-09-2012 / 16:15:50 / cg" |
248 "Modified: / 06-09-2012 / 16:15:50 / cg" |
249 ! |
249 ! |
250 |
250 |
251 buildWithOutputTo:stdOut errorTo:stdErr |
251 buildWithOutputTo:stdOutArg errorTo:stdErrArg |
252 "/ intermediate - this will move into a commonly used utility class |
252 "/ intermediate - this will move into a commonly used utility class |
253 "/ (where all the project code support will be collected). |
253 "/ (where all the project code support will be collected). |
254 |
254 |
255 |module directory| |
255 |module directory| |
256 |
256 |
837 packageDef compiled_classNamesForPlatform) do:[:eachClassName | |
837 packageDef compiled_classNamesForPlatform) do:[:eachClassName | |
838 |cls| |
838 |cls| |
839 |
839 |
840 cls := Smalltalk classNamed:eachClassName. |
840 cls := Smalltalk classNamed:eachClassName. |
841 "/ self assert:cls isLoaded. |
841 "/ self assert:cls isLoaded. |
842 cls isLoaded ifTrue:[ |
842 cls isNil ifTrue:[ |
843 self createHeaderFileFor:cls in:packageTargetDir |
843 stdErr nextPutLine:('Missing class: ',eachClassName, ' (not present in system. Warning only:subclasses of it will not be compiled)'). |
|
844 ] ifFalse:[ |
|
845 cls isLoaded ifTrue:[ |
|
846 self createHeaderFileFor:cls in:packageTargetDir |
|
847 ] |
844 ]. |
848 ]. |
845 ]. |
849 ]. |
846 self copyResourcesForPackage:eachPackageToFileout. |
850 self copyResourcesForPackage:eachPackageToFileout. |
847 ]. |
851 ]. |
848 |
852 |
887 |
891 |
888 "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName. |
892 "/ makeCommand := makeCommand, ' TOP=', mySTXTopDirectory pathName. |
889 |
893 |
890 OperatingSystem isUNIXlike ifTrue:[ |
894 OperatingSystem isUNIXlike ifTrue:[ |
891 "/ generate the makefile first |
895 "/ generate the makefile first |
|
896 self activityNotification:('sh %1/rules/stmkmf' bindWith:mySTXTopDirectory pathName). |
892 OperatingSystem |
897 OperatingSystem |
893 executeCommand:('sh %1/rules/stmkmf' bindWith:mySTXTopDirectory pathName) |
898 executeCommand:('sh %1/rules/stmkmf' bindWith:mySTXTopDirectory pathName) |
894 inputFrom:nil |
899 inputFrom:nil |
895 outputTo:stdOut |
900 outputTo:stdOut |
896 errorTo:stdErr |
901 errorTo:stdErr |
898 onError:[:status | self error:'make failed']. |
903 onError:[:status | self error:'make failed']. |
899 ]. |
904 ]. |
900 |
905 |
901 projectDefinitionClass isLibraryDefinition ifTrue:[ |
906 projectDefinitionClass isLibraryDefinition ifTrue:[ |
902 "/ generate the library |
907 "/ generate the library |
|
908 self activityNotification:(makeCommand,' classLibRule'). |
903 OperatingSystem |
909 OperatingSystem |
904 executeCommand:(makeCommand,' classLibRule') |
910 executeCommand:(makeCommand,' classLibRule') |
905 inputFrom:nil |
911 inputFrom:nil |
906 outputTo:stdOut |
912 outputTo:stdOut |
907 errorTo:stdErr |
913 errorTo:stdErr |
908 inDirectory:(buildDirectory / module / directory) |
914 inDirectory:(buildDirectory / module / directory) |
909 onError:[:status | self error:'make failed']. |
915 onError:[:status | self error:'make failed']. |
910 ] ifFalse:[ |
916 ] ifFalse:[ |
911 OperatingSystem |
917 (makeExeOnly ? false) ifTrue:[ |
912 "/ generate the executable |
918 self activityNotification:(makeCommand,' exe'). |
913 executeCommand:(makeCommand,' exe') |
919 OperatingSystem |
914 inputFrom:nil |
920 "/ generate the executable |
915 outputTo:stdOut |
921 executeCommand:(makeCommand,' exe') |
916 errorTo:stdErr |
922 inputFrom:nil |
917 inDirectory:(buildDirectory / module / directory) |
923 outputTo:stdOut |
918 onError:[:status | self error:'make failed']. |
924 errorTo:stdErr |
919 |
925 inDirectory:(buildDirectory / module / directory) |
920 (makeExeOnly ? false) ifFalse:[ |
926 onError:[:status | self error:'make failed']. |
|
927 |
|
928 ] ifFalse:[ |
921 "/ generate the self-installable package |
929 "/ generate the self-installable package |
|
930 self activityNotification:(makeCommand,' ALL_NP'). |
922 OperatingSystem |
931 OperatingSystem |
923 executeCommand:(makeCommand,' setup') |
932 executeCommand:(makeCommand,' ALL_NP') |
924 inputFrom:nil |
933 inputFrom:nil |
925 outputTo:stdOut |
934 outputTo:stdOut |
926 errorTo:stdErr |
935 errorTo:stdErr |
927 inDirectory:(buildDirectory / module / directory) |
936 inDirectory:(buildDirectory / module / directory) |
928 onError:[:status | self error:'make failed']. |
937 onError:[:status | self error:'make failed']. |