[前][次][番号順一覧][スレッド一覧]

ruby-changes:26730

From: nobu <ko1@a...>
Date: Fri, 11 Jan 2013 19:22:02 +0900 (JST)
Subject: [ruby-changes:26730] nobu:r38783 (trunk): setup.mak: -osname-

nobu	2013-01-11 19:21:52 +0900 (Fri, 11 Jan 2013)

  New Revision: 38783

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38783

  Log:
    setup.mak: -osname-
    
    * win32/setup.mak (-osname-): separate from -runtime- and just
      compile.

  Modified files:
    trunk/win32/setup.mak

Index: win32/setup.mak
===================================================================
--- win32/setup.mak	(revision 38782)
+++ win32/setup.mak	(revision 38783)
@@ -70,7 +70,7 @@ USE_RUBYGEMS = $(USE_RUBYGEMS) https://github.com/ruby/ruby/blob/trunk/win32/setup.mak#L70
 	@echo !endif>> $(MAKEFILE)
 !endif
 
--system-vars-: -runtime-
+-system-vars-: -osname- -runtime-
 
 -system-vars32-: -osname32- -runtime-
 
@@ -82,6 +82,16 @@ USE_RUBYGEMS = $(USE_RUBYGEMS) https://github.com/ruby/ruby/blob/trunk/win32/setup.mak#L82
 -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() https://github.com/ruby/ruby/blob/trunk/win32/setup.mak#L136
 	    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);
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]