diff configure.d @ 131:5920bb2ddd0f

Update configure/builder to dmd-2.059
author David Bryant <bagnose@gmail.com>
date Tue, 24 Apr 2012 21:44:20 +0930
parents 1da160a2c373
children 9e1a313d8003
line wrap: on
line diff
--- a/configure.d	Thu Jan 12 18:20:58 2012 +1030
+++ b/configure.d	Tue Apr 24 21:44:20 2012 +0930
@@ -46,7 +46,7 @@
     // check that source_path looks like a source tree by making sure
     // that a README and options file are present
     writefln("Examining source");
-    if (!std.path.join(sourcePath, "README").exists || !std.path.join(sourcePath, "options").exists) {
+    if (!std.path.buildPath(sourcePath, "README").exists || !std.path.buildPath(sourcePath, "options").exists) {
         writefln("Error - current directory must contain README and options");
         return -1;
     }
@@ -58,26 +58,26 @@
         return -1;
     }
     targetPath.mkdirRecurse;
-    string binPath = std.path.join(targetPath, "bin");
+    string binPath = std.path.buildPath(targetPath, "bin");
     binPath.mkdir;
 
     // compile builder into bin_path
     writefln("Building the builder");
-    int ret = system(format("dmd -m32 -w -wi %s -O -of%s",
-                            std.path.join(sourcePath, "builder.d"), std.path.join(binPath, "builder")));
+    int ret = system(format("dmd -m64 -w -wi %s -O -of%s",
+                            std.path.buildPath(sourcePath, "builder.d"), std.path.buildPath(binPath, "builder")));
     if (ret) {
         writefln("Error - builder failed to compile");
         return -1;
     }
-    std.path.join(binPath, "builder.o").remove;
+    std.path.buildPath(binPath, "builder.o").remove;
 
     // set up scripts
     {
-        auto file = File(std.path.join(targetPath, "build"), "w");
+        auto file = File(std.path.buildPath(targetPath, "build"), "w");
         file.writefln("#!/bin/bash");
-        file.writefln("%s %s %s", std.path.join(binPath, "builder"), sourcePath, targetPath);
+        file.writefln("%s %s %s", std.path.buildPath(binPath, "builder"), sourcePath, targetPath);
     }
-    system("chmod +x " ~ std.path.join(targetPath, "build"));
+    system("chmod +x " ~ std.path.buildPath(targetPath, "build"));
     writefln("All done");
 
     return 0;