Mercurial > projects > ddmd
comparison buildHelper.d @ 172:5a9a88e919f9
BuildHelper updated to use src and lib from dmd2/, not copies
author | korDen |
---|---|
date | Fri, 08 Oct 2010 20:23:30 +0400 |
parents | b080e62b16b4 |
children | 0622fff7810a |
comparison
equal
deleted
inserted
replaced
171:b080e62b16b4 | 172:5a9a88e919f9 |
---|---|
12 enum dmdArchiveBaseURL = "http://ftp.digitalmars.com/"; | 12 enum dmdArchiveBaseURL = "http://ftp.digitalmars.com/"; |
13 enum dmdLib = "dmd.lib"; | 13 enum dmdLib = "dmd.lib"; |
14 version(Windows) | 14 version(Windows) |
15 { | 15 { |
16 enum scriptName = "build.bat"; | 16 enum scriptName = "build.bat"; |
17 enum osSubDir = "windows\\"; | 17 enum osSubDir = "windows"; |
18 enum configFile = "sc.ini"; | 18 enum configFile = "sc.ini"; |
19 enum execExt = ".exe"; | 19 enum execExt = ".exe"; |
20 } | 20 } |
21 else | 21 else |
22 { | 22 { |
23 enum scriptName = "./build.sh"; | 23 enum scriptName = "./build.sh"; |
24 enum osSubDir = "linux/"; | 24 enum osSubDir = "linux"; |
25 enum configFile = "dmd.conf"; | 25 enum configFile = "dmd.conf"; |
26 enum execExt = ""; | 26 enum execExt = ""; |
27 } | 27 } |
28 | 28 |
29 string dmdVersion; | 29 string dmdVersion; |
203 doCopy("dmd.lib", "../../../dmd.lib"); | 203 doCopy("dmd.lib", "../../../dmd.lib"); |
204 | 204 |
205 // Copy and patch config file | 205 // Copy and patch config file |
206 doChDir("../../.."); | 206 doChDir("../../.."); |
207 copyAndPatch( | 207 copyAndPatch( |
208 normFilePath("dmd2/"~osSubDir~"bin/"~configFile), | 208 normFilePath("dmd2/"~osSubDir~"/bin/"~configFile), |
209 normFilePath("bin/"~configFile), | 209 normFilePath("bin/"~configFile), |
210 (ref string data) { | 210 (ref string data) { |
211 data = data.replace(normDirPath("../.."), normDirPath("..")); | 211 data = data.replace(normDirPath("../.."), normDirPath("../dmd2")); |
212 data = data.replace(normDirPath("../lib"), normDirPath("../dmd2/"~osSubDir~"/lib")); | |
212 } | 213 } |
213 ); | 214 ); |
214 | |
215 // Copy std lib | |
216 if(exists("src")) | |
217 rmdirRecurse("src"); | |
218 mkdir("src"); | |
219 copyRecurse("dmd2/src/druntime", "src/druntime"); | |
220 copyRecurse("dmd2/src/phobos", "src/phobos" ); | |
221 copyRecurse("dmd2/"~osSubDir~"lib", "lib" ); | |
222 | 215 |
223 // Copy linker | 216 // Copy linker |
224 doCopy("dmd2/"~osSubDir~"bin/link"~execExt, "bin/link"~execExt); | 217 doCopy("dmd2/"~osSubDir~"/bin/link"~execExt, "bin/link"~execExt); |
225 | 218 |
226 return true; | 219 return true; |
227 } | 220 } |
228 | 221 |
229 int main(string[] args) | 222 int main(string[] args) |