summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-11 10:21:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-11 10:21:52 +0000
commit51914fcce6ed0fdb8ae63e51c6ae53d72e4cd755 (patch)
tree192aab1729d9e4adbe3565ab8817bd74d8fa87e7
parent101d458fdf1336b72030b38a1aec6231902f7ac5 (diff)
setup.mak: -osname-
* win32/setup.mak (-osname-): separate from -runtime- and just compile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--win32/setup.mak19
1 files changed, 11 insertions, 8 deletions
diff --git a/win32/setup.mak b/win32/setup.mak
index 17fa951..7c69334 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -70,7 +70,7 @@ USE_RUBYGEMS = $(USE_RUBYGEMS)
@echo !endif>> $(MAKEFILE)
!endif
--system-vars-: -runtime-
+-system-vars-: -osname- -runtime-
-system-vars32-: -osname32- -runtime-
@@ -82,6 +82,16 @@ USE_RUBYGEMS = $(USE_RUBYGEMS)
-osname64-: nul
@echo TARGET_OS = mswin64 >>$(MAKEFILE)
+-osname-: nul
+ @echo !ifndef TARGET_OS>>$(MAKEFILE)
+ @($(CC) -c <<conftest.c > nul && (echo TARGET_OS = mswin32) || (echo TARGET_OS = mswin64)) >>$(MAKEFILE)
+#ifdef _WIN64
+#error
+#endif
+<<
+ @echo !endif>>$(MAKEFILE)
+ @$(WIN32DIR:/=\)\rm.bat conftest.*
+
-runtime-: nul
@$(CC) -MD <<rtname.c user32.lib -link > nul
#include <windows.h>
@@ -126,13 +136,6 @@ runtime_name()
ver = p;
}
}
- printf("!ifndef TARGET_OS\n");
-#ifdef _WIN64
- printf("TARGET_OS = mswin64\n");
-#else
- printf("TARGET_OS = mswin32\n");
-#endif
- printf("!endif\n");
if (ver) {
printf("PLATFORM = $$(TARGET_OS)_%s\n", ver);
}