diff 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
line wrap: on
line diff
--- a/buildHelper.d	Sun Oct 03 17:55:10 2010 -0400
+++ b/buildHelper.d	Fri Oct 08 20:23:30 2010 +0400
@@ -14,14 +14,14 @@
 version(Windows)
 {
 	enum scriptName = "build.bat";
-	enum osSubDir   = "windows\\";
+	enum osSubDir   = "windows";
 	enum configFile = "sc.ini";
 	enum execExt    = ".exe";
 }
 else
 {
 	enum scriptName = "./build.sh";
-	enum osSubDir   = "linux/";
+	enum osSubDir   = "linux";
 	enum configFile = "dmd.conf";
 	enum execExt    = "";
 }
@@ -205,23 +205,16 @@
 	// Copy and patch config file
 	doChDir("../../..");
 	copyAndPatch(
-		normFilePath("dmd2/"~osSubDir~"bin/"~configFile),
+		normFilePath("dmd2/"~osSubDir~"/bin/"~configFile),
 		normFilePath("bin/"~configFile),
 		(ref string data) {
-			data = data.replace(normDirPath("../.."), normDirPath(".."));
+			data = data.replace(normDirPath("../.."), normDirPath("../dmd2"));
+			data = data.replace(normDirPath("../lib"), normDirPath("../dmd2/"~osSubDir~"/lib"));
 		}
 	);
-	
-	// Copy std lib
-	if(exists("src"))
-		rmdirRecurse("src");
-	mkdir("src");
-	copyRecurse("dmd2/src/druntime",    "src/druntime");
-	copyRecurse("dmd2/src/phobos",      "src/phobos"  );
-	copyRecurse("dmd2/"~osSubDir~"lib", "lib"         );
 
 	// Copy linker
-	doCopy("dmd2/"~osSubDir~"bin/link"~execExt, "bin/link"~execExt);
+	doCopy("dmd2/"~osSubDir~"/bin/link"~execExt, "bin/link"~execExt);
 
 	return true;
 }