Skip to content

Commit

Permalink
[msvc] Allow cygwin "make" to be called after winsetup.bat
Browse files Browse the repository at this point in the history
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)

(cherry picked from commit 1d6b8a7)
  • Loading branch information
Jo Shields committed Nov 26, 2014
1 parent cba1d4f commit 2d61e91
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ config.status
config.sub
configure
configure.scan
cygconfig.h
depcomp
install-sh
libtool
Expand Down
1 change: 1 addition & 0 deletions msvc/winsetup.bat
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 5 additions & 0 deletions winconfig.h
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -630,3 +634,4 @@

/* Version number of package */
#define VERSION "3.12.0"
#endif

0 comments on commit 2d61e91

Please sign in to comment.