changeset 711:eed2de0c67a0

Changed premake script to write target triple to a file, then read that, instead of using popen
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Mon, 20 Oct 2008 23:33:59 +0200
parents 20a5180f2e80
children 8c0d3ec8dbbb
files premake.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/premake.lua	Sat Oct 18 14:33:11 2008 +0200
+++ b/premake.lua	Mon Oct 20 23:33:59 2008 +0200
@@ -31,10 +31,12 @@
 if options["target-override"] then
     TRIPLE = options["target-override"]
 else
-    local p = io.popen("sh config.guess")
-    TRIPLE = p:read()
+    os.execute("sh config.guess > default-target-triple.tmp")
+    TRIPLE = io.open("default-target-triple.tmp"):read()
 end
 
+io.write("Default target: '"..TRIPLE.."'\n");
+
 -- D version - don't change these !!!
 DMDV1 = "1"