# HG changeset patch # User Claus Gittinger # Date 1346713745 -7200 # Node ID 6e62954c5f3547198562c976041c60c68f1902fe # Parent e12e4a47cfaa7be75c38e87f9546a1a635b36975 added: #copySupportFilesForCompilation comment/format in: #copySTCDirectoryForBuild #copySupportFilesForLinkage changed: #buildWithOutputTo:errorTo: #copyStartupFilesFromSmalltalk diff -r e12e4a47cfaa -r 6e62954c5f35 ProjectBuilder.st --- a/ProjectBuilder.st Tue Sep 04 00:34:29 2012 +0200 +++ b/ProjectBuilder.st Tue Sep 04 01:09:05 2012 +0200 @@ -251,12 +251,15 @@ self generateSourceFiles. self activityNotification:'Copying dlls for linkage...'. self copyDLLsForLinkage. - self activityNotification:'Copying support files for linkage...'. + self activityNotification:'Copying support files for compilation and linkage...'. + self copySupportFilesForCompilation. self copySupportFilesForLinkage. self copyStartupFilesFromSmalltalk. self activityNotification:'Executing make...'. self makeWithOutputTo:stdOut errorTo:stdErr. + + "Modified: / 04-09-2012 / 00:49:52 / cg" ! ! !ProjectBuilder methodsFor:'building/private'! @@ -373,6 +376,8 @@ ! copySTCDirectoryForBuild + "copy stc files to the build directory" + |targetDir stc files| targetDir := buildDirectory / 'stx' / 'stc'. @@ -401,9 +406,13 @@ ]. self activityNotification:nil + + "Modified (comment): / 04-09-2012 / 00:49:19 / cg" ! copyStartupFilesFromSmalltalk + "copy additional smalltalk startup files to the build directory" + (buildDirectory / 'stx' / 'projects/smalltalk' ) exists ifFalse:[ (buildDirectory / 'stx' / 'projects/smalltalk' ) recursiveMakeDirectory. ]. @@ -424,9 +433,49 @@ (myTopDirectory / 'stx' / 'doc/online/english/LICENCE_STX.html') copyTo: (buildDirectory / 'stx' / 'projects/smalltalk' / 'LICENCE_STX.html'). + + "Modified (comment): / 04-09-2012 / 00:48:47 / cg" +! + +copySupportFilesForCompilation + "copy the tcc compiler to the build directory" + + |files| + + files := #(). + + OperatingSystem isMSWINDOWSlike ifTrue:[ + usedCompiler = 'tcc' ifTrue:[ + files := files , #( + 'support/tcc' + ). + ]. + ] ifFalse:[ + files := files , #( + ) + ]. + files := files asOrderedCollection. + + files do:[:relativePath | + (mySTXTopDirectory / relativePath) exists ifTrue:[ + ((buildDirectory / 'stx' / relativePath) exists + and:[ (mySTXTopDirectory / relativePath) fileSize = (buildDirectory / 'stx' / relativePath) fileSize + and:[ (mySTXTopDirectory / relativePath) modificationTime < (buildDirectory / 'stx' / relativePath) modificationTime + "/ and:[ (mySTXTopDirectory / dllRelativePath) sameContentsAs:(targetBuildDir / dllRelativePath) ] + ]]) ifFalse:[ + (mySTXTopDirectory / relativePath) recursiveCopyTo:(buildDirectory / 'stx' / relativePath). + ] + ] ifFalse:[ + self error:'Missing directory: ',relativePath printString mayProceed:true. + ]. + ]. + + "Created: / 04-09-2012 / 00:47:49 / cg" ! copySupportFilesForLinkage + "copy additional files which are req'd for linkage to the build directory" + |files| OperatingSystem isMSWINDOWSlike ifTrue:[ @@ -492,7 +541,7 @@ ]. ]. - "Modified: / 04-09-2012 / 00:25:26 / cg" + "Modified (comment): / 04-09-2012 / 00:48:24 / cg" ! createHeaderFileFor:aClass in:packageTargetDir