Pārlūkot izejas kodu

[msvc] Allow cygwin "make" to be called after winsetup.bat

As-is, winsetup.bat replaces config.h with winconfig.h, which is needed for the MSVC compilation - but breaks all further use of cygwin's make (e.g. to build the class library, or run "make install").

This patch introduces a new cygconfig.h as a backup prior to squashing config.h (if it exists, so the runtime can still be built without cygwin ever being used), and makes winconfig.h use it on non-MSVC compilers (i.e. cygwin)
Jo Shields 11 gadi atpakaļ
vecāks
revīzija
1d6b8a75fa
3 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 1 0
      .gitignore
  2. 1 0
      msvc/winsetup.bat
  3. 5 0
      winconfig.h

+ 1 - 0
.gitignore

@@ -69,6 +69,7 @@ config.status
 config.sub
 configure
 configure.scan
+cygconfig.h
 depcomp
 install-sh
 libtool

+ 1 - 0
msvc/winsetup.bat

@@ -1,5 +1,6 @@
 @echo off
 cd ..
+if exist config.h if not exist cygconfig.h copy config.h cygconfig.h
 copy winconfig.h config.h
 goto end
 :error

+ 5 - 0
winconfig.h

@@ -1,6 +1,10 @@
 /* config.h.  Generated from config.h.in by configure.  */
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+#ifndef _MSC_VER
+#include "cygconfig.h"
+#else
+
 /* The architecture this is running on */
 #if defined(_M_IA64)
 #define ARCHITECTURE "ia64"
@@ -630,3 +634,4 @@
 
 /* Version number of package */
 #define VERSION "3.12.1"
+#endif