summary refs log tree commit diff stats
path: root/koch.nim
diff options
context:
space:
mode:
authorrumpf_a@web.de <>2009-12-19 18:15:49 +0100
committerrumpf_a@web.de <>2009-12-19 18:15:49 +0100
commit8ce705f6860169b6b0c6db94db38ba25f4f1965f (patch)
tree3927687f72c4bfcb3a149c3b9914b65085a61736 /koch.nim
parent10ab814fbae0a54151028efd42ee9f806cc6bacd (diff)
downloadNim-8ce705f6860169b6b0c6db94db38ba25f4f1965f.tar.gz
got rid of platdef.c generation
Diffstat (limited to 'koch.nim')
-rwxr-xr-xkoch.nim10
1 files changed, 6 insertions, 4 deletions
diff --git a/koch.nim b/koch.nim
index 02b0334b0..16efbb5ac 100755
--- a/koch.nim
+++ b/koch.nim
@@ -20,7 +20,7 @@ const
 Build time: $2, $3
 
 Usage:
-  koch.py [options] command [options for command]
+  koch [options] command [options for command]
 Options:
   --help, -h               shows this help and quits
 Possible Commands:
@@ -90,7 +90,7 @@ proc writePlatdefC =
     quit("Cannot write 'build/platdef.c'\n")
 
 const
-  bootOptions = "--compile:build/platdef.c"
+  bootOptions = "" # "--compile:build/platdef.c"
 
 proc findStartNimrod: string = 
   const buildScript = "build.sh"
@@ -118,16 +118,18 @@ proc findStartNimrod: string =
 
 proc bootIteration(args: string): bool = 
   var nimrod1 = "rod" / "nimrod1".exe
+  if not ExistsFile("rod" / "nimrod".exe):
+    quit("no binary has been created! Failed! Try with --forcebuild")
   moveFile nimrod1, "rod" / "nimrod".exe
   exec "rod" / "nimrod1 cc $# $# rod/nimrod.nim" % [bootOptions, args]
-  result = sameFileContent("rod" / "nimrod".exe, "rod" / "nimrod1".exe)
+  result = sameFileContent("rod" / "nimrod".exe, nimrod1)
   if result:
     moveFile "bin" / "nimrod".exe, "rod" / "nimrod".exe
     echo "executables are equal: SUCCESS!"
   removeFile nimrod1
 
 proc boot(args: string) =
-  writePlatdefC()
+  #writePlatdefC()
   echo "iteration: 1"
   exec findStartNimrod() & " cc $# $# rod" / "nimrod.nim" % [bootOptions, args]
   echo "iteration: 2"