From 2347e874512d7c73648ccd5c5523a8bf999dfc02 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 23 Jan 2015 07:46:33 +0000 Subject: [PATCH 01/14] CSharp test-suite support on windows - Add pathconvert tool to convert to a windows path for input files for C# compiler - Simplify vcfilter --- Examples/test-suite/csharp/Makefile.in | 7 +++---- Tools/convertpath | 27 ++++++++++++++++++++++++++ Tools/vcfilter | 4 ++-- configure.ac | 11 ++++------- 4 files changed, 36 insertions(+), 13 deletions(-) create mode 100755 Tools/convertpath diff --git a/Examples/test-suite/csharp/Makefile.in b/Examples/test-suite/csharp/Makefile.in index 292c751e4..d5eac5c03 100644 --- a/Examples/test-suite/csharp/Makefile.in +++ b/Examples/test-suite/csharp/Makefile.in @@ -6,8 +6,7 @@ LANGUAGE = csharp SCRIPTSUFFIX = _runme.cs CSHARPCILINTERPRETER = @CSHARPCILINTERPRETER@ CSHARPCILINTERPRETER_FLAGS = @CSHARPCILINTERPRETER_FLAGS@ -CSHARPPATHSEPARATOR = "@CSHARPPATHSEPARATOR@" -CSHARPCYGPATH_W = @CSHARPCYGPATH_W@ +CSHARPCONVERTPATH = @top_srcdir@/@CSHARPCONVERTPATH@ srcdir = @srcdir@ top_srcdir = ../@top_srcdir@ @@ -79,13 +78,13 @@ run_testcase = \ if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \ $(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \ CSHARPFLAGS='-nologo -debug+ $(CSHARPFLAGSSPECIAL) -out:$*_runme.exe' \ - CSHARPSRCS='`$(CSHARPCYGPATH_W) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` `find $* -name "*.cs" -exec $(CSHARPCYGPATH_W) "{}" \+`' csharp_compile && \ + CSHARPSRCS='`$(CSHARPCONVERTPATH) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` `find $* -name "*.cs" -exec $(CSHARPCONVERTPATH) "{}" \+`' csharp_compile && \ env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_FALLBACK_LIBRARY_PATH= $(RUNTOOL) $(CSHARPCILINTERPRETER) $(CSHARPCILINTERPRETER_FLAGS) ./$*_runme.exe; \ else \ cd $* && \ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \ CSHARPFLAGS='-nologo -debug+ $(CSHARPFLAGSSPECIAL) -t:module -out:$*.netmodule' \ - CSHARPSRCS='`find . -name "*.cs" -exec $(CSHARPCYGPATH_W) "{}" \+`' csharp_compile; \ + CSHARPSRCS='`find . -name "*.cs" -exec ../$(CSHARPCONVERTPATH) "{}" \+`' csharp_compile; \ fi # Clean: remove testcase directories diff --git a/Tools/convertpath b/Tools/convertpath new file mode 100755 index 000000000..fce5ac24b --- /dev/null +++ b/Tools/convertpath @@ -0,0 +1,27 @@ +#!/bin/sh + +# Unix to Windows relative path conversion in a script. +# Useful for avoiding backslash quoting difficulties in Makefiles. +# Acts as a much dumbed down 'cygpath -w' tool. + +usage() +{ + cat <&1 dos2unix | grep -v "\.cxx$" | grep -v "\.c$" | grep -v "^ Creating library" | grep -v "^Generating Code" +2>&1 dos2unix | grep -v -e "\.cxx$" -e "\.c$" -e "^ Creating library" -e "^Generating Code" diff --git a/configure.ac b/configure.ac index dfd874b75..5a0298ac1 100644 --- a/configure.ac +++ b/configure.ac @@ -1993,8 +1993,7 @@ else CSHARPCOMPILER="$CSHARPCOMPILERBIN" fi -CSHARPPATHSEPARATOR="/" -CSHARPCYGPATH_W=echo +CSHARPCONVERTPATH="Tools/convertpath -u" if test -z "$CSHARPBIN" ; then CSHARPCILINTERPRETER="" CSHARPCILINTERPRETER_FLAGS="" @@ -2021,8 +2020,7 @@ if test -z "$CSHARPBIN" ; then CSHARPCILINTERPRETER_FLAGS="--debug" else if test "csc" = "$CSHARPCOMPILER"; then - CSHARPPATHSEPARATOR="\\\\" - CSHARPCYGPATH_W='cygpath -w' + CSHARPCONVERTPATH="Tools/convertpath -w" fi fi fi @@ -2065,11 +2063,10 @@ fi AC_SUBST(CSHARPCILINTERPRETER_FLAGS) AC_SUBST(CSHARPCILINTERPRETER) -AC_SUBST(CSHARPPATHSEPARATOR) -AC_SUBST(CSHARPCYGPATH_W) +AC_SUBST(CSHARPCONVERTPATH) AC_SUBST(CSHARPCOMPILER) AC_SUBST(CSHARPDYNAMICLINKING) -AC_SUBST(CSHARPLIBRARYPREFIX) # Is this going to be used? +AC_SUBST(CSHARPLIBRARYPREFIX) AC_SUBST(CSHARPCFLAGS) AC_SUBST(CSHARPSO) From e60445b28007a846c912b9695b3e64713ab0373b Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 17 Feb 2015 20:37:19 +0000 Subject: [PATCH 02/14] Add support for Windows in AX_BOOST_BASE Serial 26 in autoconf macro archive --- Tools/config/ax_boost_base.m4 | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Tools/config/ax_boost_base.m4 b/Tools/config/ax_boost_base.m4 index 550b64138..f3279f2b7 100644 --- a/Tools/config/ax_boost_base.m4 +++ b/Tools/config/ax_boost_base.m4 @@ -33,7 +33,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 23 +#serial 26 AC_DEFUN([AX_BOOST_BASE], [ @@ -92,8 +92,11 @@ if test "x$want_boost" = "xyes"; then libsubdirs="lib" ax_arch=`uname -m` case $ax_arch in - x86_64|ppc64|s390x|sparc64|aarch64) - libsubdirs="lib64 lib lib64" + x86_64) + libsubdirs="lib64 libx32 lib lib64" + ;; + ppc64|s390x|sparc64|aarch64|ppc64le) + libsubdirs="lib64 lib lib64 ppc64le" ;; esac @@ -170,6 +173,10 @@ if test "x$want_boost" = "xyes"; then dnl if we found no boost with system layout we search for boost libraries dnl built and installed without the --layout=system option or for a staged(not installed) version if test "x$succeeded" != "xyes"; then + CPPFLAGS="$CPPFLAGS_SAVED" + LDFLAGS="$LDFLAGS_SAVED" + BOOST_CPPFLAGS= + BOOST_LDFLAGS= _version=0 if test "$ac_boost_path" != ""; then if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then @@ -182,6 +189,12 @@ if test "x$want_boost" = "xyes"; then VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" done + dnl if nothing found search for layout used in Windows distributions + if test -z "$BOOST_CPPFLAGS"; then + if test -d "$ac_boost_path/boost" && test -r "$ac_boost_path/boost"; then + BOOST_CPPFLAGS="-I$ac_boost_path" + fi + fi fi else if test "$cross_compiling" != yes; then @@ -270,4 +283,3 @@ if test "x$want_boost" = "xyes"; then fi ]) - From e544ce8f82cccef9e4328217b20c44a5b9d4a27d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 23 Feb 2015 22:34:53 +0000 Subject: [PATCH 03/14] Update AX_PATH_GENERIC for spaces support Fix when the _CFLAGS and _LIBS are provided and they contain a space For example: ./configure PCRE_LIBS='-L/home/me/pcre/lib -lpcre' Serial number 13 in autoconf macro archive --- Tools/config/ax_path_generic.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/config/ax_path_generic.m4 b/Tools/config/ax_path_generic.m4 index 6960d612a..f77fc78d6 100644 --- a/Tools/config/ax_path_generic.m4 +++ b/Tools/config/ax_path_generic.m4 @@ -69,7 +69,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 11 +#serial 13 AU_ALIAS([AC_PATH_GENERIC], [AX_PATH_GENERIC]) AC_DEFUN([AX_PATH_GENERIC],[ @@ -89,7 +89,7 @@ AC_DEFUN([AX_PATH_GENERIC],[ AC_ARG_VAR(UP[]_CFLAGS, [CFLAGS used for $1]) AC_ARG_VAR(UP[]_LIBS, [LIBS used for $1]) - AS_IF([test x$UP[]_CFLAGS != x -o x$UP[]_LIBS != x],[ + AS_IF([test x"$UP[]_CFLAGS" != x -o x"$UP[]_LIBS" != x],[ dnl Don't run config script at all, use user-provided values instead. AC_SUBST(UP[]_CFLAGS) AC_SUBST(UP[]_LIBS) From f6e25f5786db989788caa9d1c0cc91ba5386e00a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 25 Mar 2015 21:26:47 +0000 Subject: [PATCH 04/14] PY3 fixes for import_package example --- Examples/python/import_packages/Makefile | 1 - Examples/python/import_packages/from_init1/Makefile | 1 - Examples/python/import_packages/from_init2/Makefile | 1 - Examples/python/import_packages/from_init3/Makefile | 1 - Examples/python/import_packages/relativeimport1/Makefile | 1 - Examples/python/import_packages/relativeimport2/Makefile | 1 - Examples/python/import_packages/relativeimport3/Makefile | 1 - 7 files changed, 7 deletions(-) diff --git a/Examples/python/import_packages/Makefile b/Examples/python/import_packages/Makefile index dfd46d05c..34362f65a 100644 --- a/Examples/python/import_packages/Makefile +++ b/Examples/python/import_packages/Makefile @@ -2,7 +2,6 @@ TOP = ../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = import_packages_subdirs = \ same_modnames1 \ diff --git a/Examples/python/import_packages/from_init1/Makefile b/Examples/python/import_packages/from_init1/Makefile index b9d803a0e..dd38f90bd 100644 --- a/Examples/python/import_packages/from_init1/Makefile +++ b/Examples/python/import_packages/from_init1/Makefile @@ -2,7 +2,6 @@ TOP = ../../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = ifeq (,$(PY3)) PKG1DIR = "py2" diff --git a/Examples/python/import_packages/from_init2/Makefile b/Examples/python/import_packages/from_init2/Makefile index b9d803a0e..dd38f90bd 100644 --- a/Examples/python/import_packages/from_init2/Makefile +++ b/Examples/python/import_packages/from_init2/Makefile @@ -2,7 +2,6 @@ TOP = ../../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = ifeq (,$(PY3)) PKG1DIR = "py2" diff --git a/Examples/python/import_packages/from_init3/Makefile b/Examples/python/import_packages/from_init3/Makefile index b9d803a0e..dd38f90bd 100644 --- a/Examples/python/import_packages/from_init3/Makefile +++ b/Examples/python/import_packages/from_init3/Makefile @@ -2,7 +2,6 @@ TOP = ../../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = ifeq (,$(PY3)) PKG1DIR = "py2" diff --git a/Examples/python/import_packages/relativeimport1/Makefile b/Examples/python/import_packages/relativeimport1/Makefile index b9d803a0e..dd38f90bd 100644 --- a/Examples/python/import_packages/relativeimport1/Makefile +++ b/Examples/python/import_packages/relativeimport1/Makefile @@ -2,7 +2,6 @@ TOP = ../../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = ifeq (,$(PY3)) PKG1DIR = "py2" diff --git a/Examples/python/import_packages/relativeimport2/Makefile b/Examples/python/import_packages/relativeimport2/Makefile index b9d803a0e..dd38f90bd 100644 --- a/Examples/python/import_packages/relativeimport2/Makefile +++ b/Examples/python/import_packages/relativeimport2/Makefile @@ -2,7 +2,6 @@ TOP = ../../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = ifeq (,$(PY3)) PKG1DIR = "py2" diff --git a/Examples/python/import_packages/relativeimport3/Makefile b/Examples/python/import_packages/relativeimport3/Makefile index b9d803a0e..dd38f90bd 100644 --- a/Examples/python/import_packages/relativeimport3/Makefile +++ b/Examples/python/import_packages/relativeimport3/Makefile @@ -2,7 +2,6 @@ TOP = ../../.. SWIG = $(realpath $(TOP)/../preinst-swig) SWIGOPT = LIBS = -PY3 = ifeq (,$(PY3)) PKG1DIR = "py2" From ec7e7145aad491d166b5dac565097d8f4cf028a2 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 25 Mar 2015 22:32:51 +0000 Subject: [PATCH 05/14] Portability fixes for python example --- Examples/python/multimap/example.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples/python/multimap/example.i b/Examples/python/multimap/example.i index cc2482cc8..cb0e079ba 100644 --- a/Examples/python/multimap/example.i +++ b/Examples/python/multimap/example.i @@ -73,7 +73,7 @@ extern int gcdmain(int argc, char *argv[]); } utf8str = PyUnicode_AsUTF8String($input); PyBytes_AsStringAndSize(utf8str, &cstr, &len); - $1 = strndup(cstr, (size_t)len); + $1 = strncpy((char *)malloc(len+1), cstr, (size_t)len); $2 = (int)len; Py_DECREF(utf8str); %#else @@ -106,7 +106,7 @@ extern int count(char *bytes, int len, char c); Py_ssize_t len; PyObject *utf8str = PyUnicode_AsUTF8String($input); PyBytes_AsStringAndSize(utf8str, &cstr, &len); - $1 = strndup(cstr, (size_t)len); + $1 = strncpy((char *)malloc(len+1), cstr, (size_t)len); $2 = (int)len; Py_DECREF(utf8str); %#else From 3d61e84be66d087e1dfc0f9024bdde711816a604 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 31 Mar 2015 20:03:29 +0100 Subject: [PATCH 06/14] Add CSHARPOPTIONS for users to customise C# compiler flags --- Examples/Makefile.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Examples/Makefile.in b/Examples/Makefile.in index 6a29e9087..834accdfa 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -1345,6 +1345,8 @@ CSHARPCOMPILER = @CSHARPCOMPILER@ CSHARPCILINTERPRETER = @CSHARPCILINTERPRETER@ CSHARPCILINTERPRETER_FLAGS = @CSHARPCILINTERPRETER_FLAGS@ CSHARPCFLAGS = @CSHARPCFLAGS@ +CSHARPFLAGS = +CSHARPOPTIONS = CSHARPSO = @CSHARPSO@ CSHARP_RUNME = $(CSHARPCILINTERPRETER) $(CSHARPCILINTERPRETER_FLAGS) ./$(RUNME).exe @@ -1377,7 +1379,7 @@ SRCDIR_CSHARPSRCS = endif csharp_compile: $(SRCDIR_SRCS) - $(COMPILETOOL) $(CSHARPCOMPILER) $(CSHARPFLAGS) $(CSHARPSRCS) $(SRCDIR_CSHARPSRCS) + $(COMPILETOOL) $(CSHARPCOMPILER) $(CSHARPFLAGS) $(CSHARPOPTIONS) $(CSHARPSRCS) $(SRCDIR_CSHARPSRCS) # ----------------------------------------------------------------- # Run CSharp example From af06a48430e963711446de3b226788d4a9ce333a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 14 Feb 2015 01:44:00 +0000 Subject: [PATCH 07/14] preinst-swig script support for native windows paths - SWIG_LIB support for testing on Windows - Only in-source builds for now --- configure.ac | 9 +++++++++ preinst-swig.in | 4 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 5a0298ac1..0a9aeff4a 100644 --- a/configure.ac +++ b/configure.ac @@ -2656,6 +2656,7 @@ AC_SUBST(SKIP_ANDROID) # Miscellaneous #---------------------------------------------------------------- +ABS_SRCDIR=`(cd ${srcdir} && pwd)` # Root directory # Translate path for native Windows compilers for use with 'make check' @@ -2689,6 +2690,14 @@ case $build in esac AC_DEFINE_UNQUOTED(SWIG_LIB_WIN_UNIX, ["$SWIG_LIB_WIN_UNIX"], [Directory for SWIG system-independent libraries (Unix install on native Windows)]) +# For testing - Windows builds of SWIG do not need SWIG_LIB set +AC_EGREP_CPP([yes], +[#ifdef _WIN32 + yes +#endif +], [SWIG_LIB_PREINST=], [SWIG_LIB_PREINST=$ABS_SRCDIR/Lib]) +AC_SUBST(SWIG_LIB_PREINST) + AC_CONFIG_FILES([ Makefile swig.spec diff --git a/preinst-swig.in b/preinst-swig.in index 384593ce1..e77db7858 100755 --- a/preinst-swig.in +++ b/preinst-swig.in @@ -1,7 +1,5 @@ #!/bin/sh builddir=`dirname $0` -srcdir=`cd "$builddir" && cd '@srcdir@' && pwd` -SWIG_LIB=$srcdir/Lib -#SWIG_LIB=`cygpath -w $srcdir/Lib` # For native Windows version of SWIG +SWIG_LIB=@SWIG_LIB_PREINST@ export SWIG_LIB exec "$builddir/swig" "$@" From a57302527a9219f22a9226dc9752ec392836e396 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 17 Jan 2015 17:25:40 +0000 Subject: [PATCH 08/14] gcc and mno-cygwin tweaks on cygwin/mingw --- configure.ac | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 0a9aeff4a..0c5ff5134 100644 --- a/configure.ac +++ b/configure.ac @@ -1144,12 +1144,22 @@ else fi fi +case $host in +*-*-cygwin*) + # TODO: Only use this flag if the compiler supports it, later versions of gcc no longer have it + GCC_MNO_CYGWIN=" -mno-cygwin" + ;; +*) + GCC_MNO_CYGWIN="" + ;; +esac + # java.exe on Cygwin requires the Windows standard (Pascal) calling convention as it is a normal Windows executable and not a Cygwin built executable case $host in *-*-cygwin* | *-*-mingw*) if test "$GCC" = yes; then - JAVADYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias" - JAVACFLAGS="-mno-cygwin -mthreads" + JAVADYNAMICLINKING="$GCC_MNO_CYGWIN -mthreads -Wl,--add-stdcall-alias" + JAVACFLAGS="$GCC_MNO_CYGWIN -mthreads" else JAVADYNAMICLINKING="" JAVACFLAGS="" @@ -2032,8 +2042,8 @@ fi case $host in *-*-cygwin* | *-*-mingw*) if test "$GCC" = yes; then - CSHARPDYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias" - CSHARPCFLAGS="-mno-cygwin -mthreads" + CSHARPDYNAMICLINKING="$GCC_MNO_CYGWIN -mthreads -Wl,--add-stdcall-alias" + CSHARPCFLAGS="$GCC_MNO_CYGWIN -mthreads" else CSHARPDYNAMICLINKING="" CSHARPCFLAGS="" From f27faa9c6914d26f17c6e4940699751b940a5efd Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 2 Apr 2015 06:39:30 +0100 Subject: [PATCH 09/14] Allow for spaces in path to java include directory and executables For typical Windows installs of Java. Also don't use cygpath on MinGW. --- configure.ac | 44 +++++++++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 0c5ff5134..084096ea5 100644 --- a/configure.ac +++ b/configure.ac @@ -1108,6 +1108,7 @@ fi AC_MSG_CHECKING(for java include file jni.h) AC_ARG_WITH(javaincl, [ --with-javaincl=path Set location of Java include directory], [JAVAINCDIR="$withval"], [JAVAINCDIR=]) +JAVAINC="" if test -z "$JAVAINCDIR" ; then JAVAINCDIR="/usr/j2sdk*/include /usr/local/j2sdk*/include /usr/jdk*/include /usr/local/jdk*/include /opt/j2sdk*/include /opt/jdk*/include /usr/java/include /usr/java/j2sdk*/include /usr/java/jdk*/include /usr/local/java/include /opt/java/include /usr/include/java /usr/local/include/java /usr/lib/java/include /usr/lib/jvm/java*/include /usr/lib64/jvm/java*/include /usr/include/kaffe /usr/local/include/kaffe /usr/include" @@ -1117,30 +1118,33 @@ if test -z "$JAVAINCDIR" ; then *-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";; *);; esac -fi -JAVAINC="" -for d in $JAVAINCDIR ; do - if test -r "$d/jni.h" ; then - AC_MSG_RESULT($d) - JAVAINCDIR=$d - JAVAINC=-I\"$d\" - break + for d in $JAVAINCDIR ; do + if test -r "$d/jni.h" ; then + JAVAINCDIR=$d + JAVAINC=-I\"$d\" + break + fi + done +else + if test -r "$JAVAINCDIR/jni.h" ; then + JAVAINC=-I\"$JAVAINCDIR\" fi -done +fi if test "$JAVAINC" = "" ; then AC_MSG_RESULT(not found) else + AC_MSG_RESULT($JAVAINC) # now look for /jni_md.h AC_MSG_CHECKING(for java include file jni_md.h) JAVAMDDIR=`find "$JAVAINCDIR" -follow -name jni_md.h -print` if test "$JAVAMDDIR" = "" ; then AC_MSG_RESULT(not found) else - JAVAMDDIR=`dirname "$JAVAMDDIR" | tail -1` - JAVAINC="${JAVAINC} -I\"$JAVAMDDIR\"" + JAVAMDDIR=-I\"`dirname "$JAVAMDDIR" | tail -1`\" AC_MSG_RESULT($JAVAMDDIR) + JAVAINC="${JAVAINC} ${JAVAMDDIR}" fi fi @@ -1195,6 +1199,15 @@ case $host in esac fi +# Quote for spaces in path to executables +if test -n "$JAVA"; then + JAVA=\"$JAVA\" +fi +if test -n "$JAVAC"; then + JAVAC=\"$JAVAC\" +fi + + AC_SUBST(JAVA) AC_SUBST(JAVAC) AC_SUBST(JAVAINC) @@ -2669,13 +2682,18 @@ AC_SUBST(SKIP_ANDROID) ABS_SRCDIR=`(cd ${srcdir} && pwd)` # Root directory -# Translate path for native Windows compilers for use with 'make check' ROOT_DIR=`pwd` case $host in -*-*-cygwin* | *-*-mingw*) +*-*-cygwin*) + # Translate path for native Windows compilers for use with 'make check' if (cygpath --mixed $ROOT_DIR) >/dev/null 2>/dev/null; then ROOT_DIR=`cygpath --mixed $ROOT_DIR` fi + ;; +esac + +case $host in +*-*-cygwin* | *-*-mingw*) # Extra files generated by some Windows compilers EXTRA_CLEAN="*.stackdump *.exp *.lib *.pdb *.ilk" ;; From 0f1e8f75da0d9ed01174f12e5e081497d228dafc Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Fri, 13 Feb 2015 19:40:35 +0000 Subject: [PATCH 10/14] Detect Java on 64 bit windows --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 084096ea5..cda8b2b8e 100644 --- a/configure.ac +++ b/configure.ac @@ -1114,7 +1114,7 @@ if test -z "$JAVAINCDIR" ; then # Add in default installation directory on Windows for Cygwin case $host in - *-*-cygwin* | *-*-mingw*) JAVAINCDIR="c:/Program*Files/Java/jdk*/include d:/Program*Files/Java/jdk*/include c:/j2sdk*/include d:/j2sdk*/include c:/jdk*/include d:/jdk*/include $JAVAINCDIR";; + *-*-cygwin* | *-*-mingw*) JAVAINCDIR="c:/Program*Files*/Java/jdk*/include d:/Program*Files*/Java/jdk*/include c:/j2sdk*/include d:/j2sdk*/include c:/jdk*/include d:/jdk*/include $JAVAINCDIR";; *-*-darwin*) JAVAINCDIR="/System/Library/Frameworks/JavaVM.framework/Headers $JAVAINCDIR";; *);; esac From 62fdff1bf353e3c8cdaba521f8e7a1c89346988e Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 2 Apr 2015 06:40:43 +0100 Subject: [PATCH 11/14] Python 2 and 3 testing on Windows --- configure.ac | 291 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 195 insertions(+), 96 deletions(-) mode change 100644 => 100755 configure.ac diff --git a/configure.ac b/configure.ac old mode 100644 new mode 100755 index cda8b2b8e..ce596d29c --- a/configure.ac +++ b/configure.ac @@ -601,6 +601,7 @@ AC_SUBST(TCLCXXSHARED) PYINCLUDE= PYLIB= +PYLINK= PYPACKAGE= AC_ARG_WITH(python, AS_HELP_STRING([--without-python], [Disable Python]) @@ -617,64 +618,106 @@ else PYTHON="$PYBIN" fi + PYVER=0 if test -n "$PYTHON"; then + AC_MSG_CHECKING([for $PYTHON major version number]) + PYVER=`($PYTHON -c "import sys; sys.stdout.write(sys.version[[0]])") 2>/dev/null` + AC_MSG_RESULT($PYVER) + if test -z "$PYVER"; then + PYVER=0 + fi + fi + + if test $PYVER -le 2; then AC_MSG_CHECKING(for Python prefix) - PYPREFIX=`($PYTHON -c "import sys; print sys.prefix") 2>/dev/null` + PYPREFIX=`($PYTHON -c "import sys; sys.stdout.write(sys.prefix)") 2>/dev/null` AC_MSG_RESULT($PYPREFIX) AC_MSG_CHECKING(for Python exec-prefix) - PYEPREFIX=`($PYTHON -c "import sys; print sys.exec_prefix") 2>/dev/null` + PYEPREFIX=`($PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)") 2>/dev/null` AC_MSG_RESULT($PYEPREFIX) + AC_MSG_CHECKING(for Python os.name) + PYOSNAME=`($PYTHON -c "import sys, os; sys.stdout.write(os.name)")` + AC_MSG_RESULT($PYOSNAME) + if test x"$PYOSNAME" = x"nt"; then + # Windows installations are quite different to posix installations + PYPREFIX=`echo "$PYPREFIX" | sed -e 's,\\\\,/,g'` # Forward slashes are easier to use and even work on Windows most of the time + PYTHON_SO=.pyd - # Note: I could not think of a standard way to get the version string from different versions. - # This trick pulls it out of the file location for a standard library file. - - AC_MSG_CHECKING(for Python version) - - # Need to do this hack since autoconf replaces __file__ with the name of the configure file - filehack="file__" - PYVERSION=`($PYTHON -c "import string,operator,os.path; print operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1)")` - AC_MSG_RESULT($PYVERSION) - - # Find the directory for libraries this is necessary to deal with - # platforms that can have apps built for multiple archs: e.g. x86_64 - AC_MSG_CHECKING(for Python lib dir) - PYLIBDIR=`($PYTHON -c "import sys; print sys.lib") 2>/dev/null` - if test -z "$PYLIBDIR"; then - # Fedora patch Python to add sys.lib, for other distros we assume "lib". - PYLIBDIR="lib" - fi - AC_MSG_RESULT($PYLIBDIR) - - # Set the include directory - - AC_MSG_CHECKING(for Python header files) - if test -r $PYPREFIX/include/$PYVERSION/Python.h; then - PYINCLUDE="-I$PYPREFIX/include/$PYVERSION -I$PYEPREFIX/$PYLIBDIR/$PYVERSION/config" - fi - if test -z "$PYINCLUDE"; then - if test -r $PYPREFIX/include/Py/Python.h; then - PYINCLUDE="-I$PYPREFIX/include/Py -I$PYEPREFIX/$PYLIBDIR/python/lib" + AC_MSG_CHECKING(for Python header files) + if test -r $PYPREFIX/include/Python.h; then + PYINCLUDE="-I$PYPREFIX/include" fi - fi - AC_MSG_RESULT($PYINCLUDE) + AC_MSG_RESULT($PYINCLUDE) - # Set the library directory blindly. This probably won't work with older versions - AC_MSG_CHECKING(for Python library) - dirs="$PYVERSION/config $PYVERSION/$PYLIBDIR python/$PYLIBDIR" - for i in $dirs; do - if test -d $PYEPREFIX/$PYLIBDIR/$i; then - PYLIB="$PYEPREFIX/$PYLIBDIR/$i" - break + AC_MSG_CHECKING(for Python library directory) + if test -d $PYPREFIX/libs; then + PYLIB=$PYPREFIX/libs + PYLINKFILE=`ls $PYLIB/python*.lib | grep "python[[0-9]][[0-9]]\.lib"` + if test -r "$PYLINKFILE"; then + PYLINK=-l`basename $PYLINKFILE | sed -e 's/\.lib$//'` + else + PYLIB= + fi fi - done + else + # Note: I could not think of a standard way to get the version string from different versions. + # This trick pulls it out of the file location for a standard library file. + + AC_MSG_CHECKING(for Python version) + + # Need to do this hack since autoconf replaces __file__ with the name of the configure file + filehack="file__" + PYVERSION=`($PYTHON -c "import sys,string,operator,os.path; sys.stdout.write(operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1))")` + AC_MSG_RESULT($PYVERSION) + + # Find the directory for libraries this is necessary to deal with + # platforms that can have apps built for multiple archs: e.g. x86_64 + AC_MSG_CHECKING(for Python lib dir) + PYLIBDIR=`($PYTHON -c "import sys; sys.stdout.write(sys.lib)") 2>/dev/null` + if test -z "$PYLIBDIR"; then + # Fedora patch Python to add sys.lib, for other distros we assume "lib". + PYLIBDIR="lib" + fi + AC_MSG_RESULT($PYLIBDIR) + + # Set the include directory + + AC_MSG_CHECKING(for Python header files) + if test -r $PYPREFIX/include/$PYVERSION/Python.h; then + PYINCLUDE="-I$PYPREFIX/include/$PYVERSION -I$PYEPREFIX/$PYLIBDIR/$PYVERSION/config" + fi + if test -z "$PYINCLUDE"; then + if test -r $PYPREFIX/include/Py/Python.h; then + PYINCLUDE="-I$PYPREFIX/include/Py -I$PYEPREFIX/$PYLIBDIR/python/lib" + fi + fi + AC_MSG_RESULT($PYINCLUDE) + + # Set the library directory blindly. This probably won't work with older versions + AC_MSG_CHECKING(for Python library directory) + dirs="$PYVERSION/config $PYVERSION/$PYLIBDIR python/$PYLIBDIR" + for i in $dirs; do + if test -d $PYEPREFIX/$PYLIBDIR/$i; then + PYLIB="$PYEPREFIX/$PYLIBDIR/$i" + break + fi + done + + PYLINK="-l$PYVERSION" + fi + if test -z "$PYLIB"; then AC_MSG_RESULT(Not found) else AC_MSG_RESULT($PYLIB) fi - - PYLINK="-l$PYVERSION" + AC_MSG_CHECKING(for Python library) + if test -z "$PYLINK"; then + AC_MSG_RESULT(Not found) + else + AC_MSG_RESULT($PYLINK) + fi fi # Cygwin (Windows) needs the library for dynamic linking @@ -697,11 +740,9 @@ AC_SUBST(PYTHONDYNAMICLINKING) # Look for Python 3.x #---------------------------------------------------------------- -# mostly copy & pasted from "Look for Python" section, -# did some trim, fix and rename - PY3INCLUDE= PY3LIB= +PY3LINK= PY3PACKAGE= AC_ARG_WITH(python3, AS_HELP_STRING([--without-python3], [Disable Python 3.x support]) @@ -712,7 +753,7 @@ if test x"${PY3BIN}" = xno -o x"${with_alllang}" = xno ; then AC_MSG_NOTICE([Disabling Python 3.x support]) else if test "x$PY3BIN" = xyes; then - for py_ver in 3 3.6 3.5 3.4 3.3 3.2 3.1 3.0; do + for py_ver in 3 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0 ""; do AC_CHECK_PROGS(PYTHON3, [python$py_ver]) if test -n "$PYTHON3"; then AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config]) @@ -726,63 +767,121 @@ else AC_CHECK_PROGS(PY3CONFIG, [$PYTHON3-config]) fi - - if test -n "$PYTHON3" -a -n "$PY3CONFIG"; then - AC_MSG_CHECKING([for Python 3.x prefix]) - PY3PREFIX=`($PY3CONFIG --prefix) 2>/dev/null` - AC_MSG_RESULT($PY3PREFIX) - AC_MSG_CHECKING(for Python 3.x exec-prefix) - PY3EPREFIX=`($PY3CONFIG --exec-prefix) 2>/dev/null` - AC_MSG_RESULT($PY3EPREFIX) - - # Note: I could not think of a standard way to get the version string from different versions. - # This trick pulls it out of the file location for a standard library file. - - AC_MSG_CHECKING([for Python 3.x version]) - - # Need to do this hack since autoconf replaces __file__ with the name of the configure file - filehack="file__" - PY3VERSION=`($PYTHON3 -c "import string,operator,os.path; print(operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1))")` - AC_MSG_RESULT($PY3VERSION) - - # Find the directory for libraries this is necessary to deal with - # platforms that can have apps built for multiple archs: e.g. x86_64 - AC_MSG_CHECKING([for Python 3.x lib dir]) - PY3LIBDIR=`($PYTHON3 -c "import sys; print(sys.lib)") 2>/dev/null` - if test -z "$PY3LIBDIR"; then - # some dists don't have sys.lib so the best we can do is assume lib - PY3LIBDIR="lib" + PYVER=0 + if test -n "$PYTHON3"; then + AC_MSG_CHECKING([for $PYTHON3 major version number]) + PYVER=`($PYTHON3 -c "import sys; sys.stdout.write(sys.version[[0]])") 2>/dev/null` + AC_MSG_RESULT($PYVER) + if test -z "$PYVER"; then + PYVER=0 fi - AC_MSG_RESULT($PY3LIBDIR) + fi - # Set the include directory + if test $PYVER -ge 3; then + AC_MSG_CHECKING(for Python 3.x os.name) + PY3OSNAME=`($PYTHON3 -c "import sys, os; sys.stdout.write(os.name)")` + AC_MSG_RESULT($PY3OSNAME) - AC_MSG_CHECKING([for Python 3.x header files]) - PY3INCLUDE=`($PY3CONFIG --includes) 2>/dev/null` - AC_MSG_RESULT($PY3INCLUDE) + if test x"$PY3OSNAME" = x"nt"; then + # Windows installations are quite different to posix installations + # There is no python-config to use + AC_MSG_CHECKING(for Python 3.x prefix) + PY3PREFIX=`($PYTHON3 -c "import sys; sys.stdout.write(sys.prefix)") 2>/dev/null` + AC_MSG_RESULT($PY3PREFIX) + PY3PREFIX=`echo "$PY3PREFIX" | sed -e 's,\\\\,/,g'` # Forward slashes are easier to use and even work on Windows most of the time + PYTHON_SO=.pyd - # Set the library directory blindly. This probably won't work with older versions - AC_MSG_CHECKING([for Python 3.x library]) - dirs="$PY3VERSION/config $PY3VERSION/$PY3LIBDIR python/$PY3LIBDIR" - for i in $dirs; do - if test -d $PY3EPREFIX/$PY3LIBDIR/$i; then - PY3LIB="$PY3EPREFIX/$PY3LIBDIR/$i" - break + AC_MSG_CHECKING(for Python 3.x header files) + if test -r $PY3PREFIX/include/Python.h; then + PY3INCLUDE="-I$PY3PREFIX/include" fi - done - if test -z "$PY3LIB"; then - AC_MSG_RESULT([Not found]) - else - AC_MSG_RESULT($PY3LIB) - fi + AC_MSG_RESULT($PY3INCLUDE) - PY3LINK="-l$PY3VERSION" + AC_MSG_CHECKING(for Python 3.x library directory) + if test -d $PY3PREFIX/libs; then + PY3LIB=$PY3PREFIX/libs + PY3LINKFILE=`ls $PY3LIB/python*.lib | grep "python[[0-9]][[0-9]]\.lib"` + if test -r "$PY3LINKFILE"; then + PY3LINK=-l`basename $PY3LINKFILE | sed -e 's/\.lib$//'` + else + PY3LIB= + fi + fi + if test -z "$PY3LIB"; then + AC_MSG_RESULT([Not found]) + else + AC_MSG_RESULT($PY3LIB) + fi + AC_MSG_CHECKING([for Python 3.x library]) + if test -z "$PY3LINK"; then + AC_MSG_RESULT(Not found) + else + AC_MSG_RESULT($PY3LINK) + fi + elif test -n "$PY3CONFIG"; then + AC_MSG_CHECKING([for Python 3.x prefix]) + PY3PREFIX=`($PY3CONFIG --prefix) 2>/dev/null` + AC_MSG_RESULT($PY3PREFIX) + AC_MSG_CHECKING(for Python 3.x exec-prefix) + PY3EPREFIX=`($PY3CONFIG --exec-prefix) 2>/dev/null` + AC_MSG_RESULT($PY3EPREFIX) + + # Note: I could not think of a standard way to get the version string from different versions. + # This trick pulls it out of the file location for a standard library file. + + AC_MSG_CHECKING([for Python 3.x version]) + + # Need to do this hack since autoconf replaces __file__ with the name of the configure file + filehack="file__" + PY3VERSION=`($PYTHON3 -c "import string,operator,os.path; print(operator.getitem(os.path.split(operator.getitem(os.path.split(string.__$filehack),0)),1))")` + AC_MSG_RESULT($PY3VERSION) + + # Find the directory for libraries this is necessary to deal with + # platforms that can have apps built for multiple archs: e.g. x86_64 + AC_MSG_CHECKING([for Python 3.x lib dir]) + PY3LIBDIR=`($PYTHON3 -c "import sys; print(sys.lib)") 2>/dev/null` + if test -z "$PY3LIBDIR"; then + # some dists don't have sys.lib so the best we can do is assume lib + PY3LIBDIR="lib" + fi + AC_MSG_RESULT($PY3LIBDIR) + + # Set the include directory + + AC_MSG_CHECKING([for Python 3.x header files]) + PY3INCLUDE=`($PY3CONFIG --includes) 2>/dev/null` + AC_MSG_RESULT($PY3INCLUDE) + + # Set the library directory blindly. This probably won't work with older versions + AC_MSG_CHECKING([for Python 3.x library directory]) + dirs="$PY3VERSION/config $PY3VERSION/$PY3LIBDIR python/$PY3LIBDIR" + for i in $dirs; do + if test -d $PY3EPREFIX/$PY3LIBDIR/$i; then + PY3LIB="$PY3EPREFIX/$PY3LIBDIR/$i" + break + fi + done + if test -z "$PY3LIB"; then + AC_MSG_RESULT([Not found]) + else + AC_MSG_RESULT($PY3LIB) + fi + + PY3LINK="-l$PY3VERSION" + + AC_MSG_CHECKING([for Python 3.x library]) + if test -z "$PY3LINK"; then + AC_MSG_RESULT(Not found) + else + AC_MSG_RESULT($PY3LINK) + fi + fi fi # Cygwin (Windows) needs the library for dynamic linking case $host in *-*-cygwin* | *-*-mingw*) - PYTHON3DYNAMICLINKING="-L$PYLIB $PY3LINK" + PYTHON3DYNAMICLINKING="-L$PY3LIB $PY3LINK" DEFS="-DUSE_DL_IMPORT $DEFS" ;; *)PYTHON3DYNAMICLINKING="";; @@ -2512,14 +2611,14 @@ AC_SUBST(SKIP_OCTAVE) SKIP_PYTHON= -if (test -z "$PYINCLUDE") && - (test -z "$PY3INCLUDE") ; then +if (test -z "$PYINCLUDE" || test -z "$PYLINK") && + (test -z "$PY3INCLUDE" || test -z "$PY3LINK") ; then SKIP_PYTHON="1" fi AC_SUBST(SKIP_PYTHON) SKIP_PYTHON3= -if test -z "$PY3INCLUDE" ; then +if test -z "$PY3INCLUDE" || test -z "$PY3LINK" ; then SKIP_PYTHON3="1" fi AC_SUBST(SKIP_PYTHON3) From 1445b364ff09137e3c29fd21fddffbf22990a680 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 2 Apr 2015 06:59:24 +0100 Subject: [PATCH 12/14] Add CI testing for Windows using Appveyor appveyor.yml file for testing at http://appveyor.com/ --- appveyor.yml | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100755 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100755 index 000000000..1cb7aaf8d --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,117 @@ +# Important to have C:\MinGW\bin at beginning of path as there is a version of bash in the default path +# TODO: where is it - with Git? +# This 32 bit version of MinGW doesn't seem to configured correctly, possibly because it is running on +# 64 bit Windows - direct.h does not compile off64_t is not defined and struct stat is missing. + +os: +- Unstable +#- Visual Studio 2014 CTP4 +#- Visual Studio 2015 CTP +#- Visual Studio 2015 Preview +#- Windows Server 2012 R2 +#- MinGW + +platform: +- x86 +- x64 + +environment: + matrix: + - SWIGLANG: csharp + - SWIGLANG: java + - SWIGLANG: python + VER: 27 + - SWIGLANG: python + VER: 34 + PY3: 1 + +#configuration: +#- Release +# +install: +- date /T & time /T +- set +#- dir C:\ +#- dir "C:\Program Files (x86)" +#- dir "C:\Program Files" +#- dir "C:\Python34" +#- dir "C:\Python34\libs" +#- set PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH% +- set PATH=C:\cygwin\bin;%PATH% +- set CYGWIN=nodosfilewarning +# - dir C:\MinGW +# - dir C:\MinGW\bin +#- dir C:\MinGW\msys\1.0\bin +- git clone -q --depth=1 --single-branch --branch cccl-1.0 git://github.com/swig/cccl.git C:\cccl-1.0 +- bash -c "cp C:/cccl-1.0/cccl /usr/bin" +- ps: >- + If ($env:Platform -Match "x86") { + $env:PCRE_PLATFORM="Win32" + $env:JAVA_HOME="C:/Program Files (x86)/Java/jdk1.8.0" + $env:VCVARS_PLATFORM="x86" + $env:LANG_PLATFORM="" + } Else { + $env:PCRE_PLATFORM="x64" + $env:JAVA_HOME="C:/Program Files/Java/jdk1.8.0" + $env:VCVARS_PLATFORM="amd64" + $env:LANG_PLATFORM="-x64" + } +- call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM% +- nuget install pcre -Verbosity detailed -Version 8.33.0.1 -OutputDirectory C:\pcre +- set PCRE_ROOT=C:/pcre/pcre.8.33.0.1/build/native +#- cinst php +#- set PATH=%PATH%;C:\tools\php +- set PATH=C:\Python%VER%%LANG_PLATFORM%;%PATH% +#- path +- python -V +- bash -c "which python" +- bash -c "python -V" +- bash -c "which cl.exe" +- bash -c "cl.exe /? 2>&1 | head -n 2" +- bash -c "which csc.exe" +- bash -c "csc.exe /? | head -n 2" +- bash -c "which cccl" +- bash -c "cccl --version" +- make --version +#- gcc -v +#- php.exe --version +#- cygcheck -s +#- set +- uname -a + +build_script: +#- echo C:\MinGW /mingw >> C:\MinGW\msys\1.0\etc\fstab +#- echo. >> C:\MinGW\msys\1.0\etc\fstab +#- type C:\MinGW\msys\1.0\etc\fstab +#- bash -c "echo $PATH" +#- bash -c "ls -la /; echo xx; ls -la /c; echo xxx; ls -la /mingw; true" +#- bash -c "mount; echo xx; ls /mingw/share/automake-1.11; echo xxx" +#- bash -c "set" +#- bash -c "find C:/Libraries/boost -maxdepth 3 -type d || true" +#- bash -c "find C:/Libraries/boost -maxdepth 3 -type f || true" +- set CCCL_OPTIONS=--cccl-muffle /W3 +- set CHECK_OPTIONS=CSHARPOPTIONS=-platform:%Platform% + # Open dummy file descriptor to fix error on cygwin: ./configure: line 560: 0: Bad file descriptor +- bash -c "exec 0- + If ("$env:SWIGLANG$env:VER" -Match "python27") { + $env:CCCL_OPTIONS="$env:CCCL_OPTIONS /wd4717" + } +- .\swig.exe -version +- bash -c "file ./swig.exe" +#- .\ccache-swig.exe -V +#- make check-errors-test-suite +- bash -c "time make -k check-%SWIGLANG%-version" +#- bash -c "time make -k check-%SWIGLANG%-examples %CHECK_OPTIONS%" +- bash -c "time make -k check-%SWIGLANG%-test-suite %CHECK_OPTIONS%" + +# Do not build on tags (GitHub only) +skip_tags: true From b0e0237347b7e1ebcf40fe90df8033a886817d1f Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 2 Apr 2015 07:25:50 +0100 Subject: [PATCH 13/14] Remove appveyor debugging code --- appveyor.yml | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1cb7aaf8d..27e8162ad 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,15 +1,5 @@ -# Important to have C:\MinGW\bin at beginning of path as there is a version of bash in the default path -# TODO: where is it - with Git? -# This 32 bit version of MinGW doesn't seem to configured correctly, possibly because it is running on -# 64 bit Windows - direct.h does not compile off64_t is not defined and struct stat is missing. - os: - Unstable -#- Visual Studio 2014 CTP4 -#- Visual Studio 2015 CTP -#- Visual Studio 2015 Preview -#- Windows Server 2012 R2 -#- MinGW platform: - x86 @@ -25,23 +15,11 @@ environment: VER: 34 PY3: 1 -#configuration: -#- Release -# install: - date /T & time /T - set -#- dir C:\ -#- dir "C:\Program Files (x86)" -#- dir "C:\Program Files" -#- dir "C:\Python34" -#- dir "C:\Python34\libs" -#- set PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH% - set PATH=C:\cygwin\bin;%PATH% - set CYGWIN=nodosfilewarning -# - dir C:\MinGW -# - dir C:\MinGW\bin -#- dir C:\MinGW\msys\1.0\bin - git clone -q --depth=1 --single-branch --branch cccl-1.0 git://github.com/swig/cccl.git C:\cccl-1.0 - bash -c "cp C:/cccl-1.0/cccl /usr/bin" - ps: >- @@ -59,10 +37,7 @@ install: - call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM% - nuget install pcre -Verbosity detailed -Version 8.33.0.1 -OutputDirectory C:\pcre - set PCRE_ROOT=C:/pcre/pcre.8.33.0.1/build/native -#- cinst php -#- set PATH=%PATH%;C:\tools\php - set PATH=C:\Python%VER%%LANG_PLATFORM%;%PATH% -#- path - python -V - bash -c "which python" - bash -c "python -V" @@ -73,30 +48,14 @@ install: - bash -c "which cccl" - bash -c "cccl --version" - make --version -#- gcc -v -#- php.exe --version -#- cygcheck -s -#- set - uname -a build_script: -#- echo C:\MinGW /mingw >> C:\MinGW\msys\1.0\etc\fstab -#- echo. >> C:\MinGW\msys\1.0\etc\fstab -#- type C:\MinGW\msys\1.0\etc\fstab -#- bash -c "echo $PATH" -#- bash -c "ls -la /; echo xx; ls -la /c; echo xxx; ls -la /mingw; true" -#- bash -c "mount; echo xx; ls /mingw/share/automake-1.11; echo xxx" -#- bash -c "set" -#- bash -c "find C:/Libraries/boost -maxdepth 3 -type d || true" -#- bash -c "find C:/Libraries/boost -maxdepth 3 -type f || true" - set CCCL_OPTIONS=--cccl-muffle /W3 - set CHECK_OPTIONS=CSHARPOPTIONS=-platform:%Platform% # Open dummy file descriptor to fix error on cygwin: ./configure: line 560: 0: Bad file descriptor - bash -c "exec 0 Date: Thu, 2 Apr 2015 07:26:51 +0100 Subject: [PATCH 14/14] Appveyor: partialcheck test-suite Java and Python time out when running just the test-suite. Compromise for now... run just partialcheck-test-suite, ie test just invoking SWIG and not C/C++compile and run tests. --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 27e8162ad..ff66b884d 100755 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,8 +67,8 @@ test_script: - .\swig.exe -version - bash -c "file ./swig.exe" - bash -c "time make -k check-%SWIGLANG%-version" -#- bash -c "time make -k check-%SWIGLANG%-examples %CHECK_OPTIONS%" -- bash -c "time make -k check-%SWIGLANG%-test-suite %CHECK_OPTIONS%" +- bash -c "time make -k check-%SWIGLANG%-examples %CHECK_OPTIONS%" +- bash -c "time make -k partialcheck-%SWIGLANG%-test-suite %CHECK_OPTIONS%" # Do not build on tags (GitHub only) skip_tags: true