diff src/share/tools/MakeDeps/Util.java @ 1408:0ba67bb5392c

added c1x build directory, added MSVC Win64 project support
author lstadler
date Wed, 12 May 2010 15:01:05 +0200
parents a61af66fc99e
children 2d26b0046e0d
line wrap: on
line diff
--- a/src/share/tools/MakeDeps/Util.java	Tue May 11 19:24:14 2010 +0200
+++ b/src/share/tools/MakeDeps/Util.java	Wed May 12 15:01:05 2010 +0200
@@ -23,6 +23,7 @@
  */
 
 import java.util.*;
+import java.util.Map.Entry;
 import java.io.File;
 
 public class Util {
@@ -84,5 +85,25 @@
     }
 
     static String sep = File.separator;
-    static String os = "Win32"; //System.getProperty("os.name");
+    
+    private static String _os;
+    
+    static String os() {
+    	if( _os==null) {
+
+        	for(Map.Entry<String, String> entry: System.getenv().entrySet())
+        		if("PLATFORM_ARCH_MODEL".equals(entry.getKey().toUpperCase())) {
+        			String archModel = entry.getValue();
+        			if("x86_32".equals(archModel))
+        				_os = "Win32";
+        			else if("x86_64".equals(archModel))
+        				_os = "x64";
+        			else
+        				throw new RuntimeException("Unsupported PLATFORM_ARCH_MODEL " + archModel);
+        			return _os;
+        		}
+        	throw new RuntimeException("PLATFORM_ARCH_MODEL not specified");
+    	}
+    	return _os;
+    }
 }