Skip to content
Browse files

Test-suite makefile fixes for Windows

Remove $(realpath ) which is no good for Windows executables running
under Cygwin's make
  • Loading branch information...
1 parent 68347cb commit 78719759d5572b6c80c6a7061e71f78bee49a5ea @wsfulton wsfulton committed May 28, 2014
Showing with 15 additions and 7 deletions.
  1. +3 −3 Examples/Makefile.in
  2. +12 −4 Examples/test-suite/java/preproc_line_file_runme.java
View
6 Examples/Makefile.in
@@ -576,7 +576,7 @@ JAVAC = @JAVAC@ -d .
# ----------------------------------------------------------------
java: $(SRCDIR_SRCS)
- $(SWIG) -java $(SWIGOPT) -o $(ISRCS) $(realpath $(INTERFACEPATH))
+ $(SWIG) -java $(SWIGOPT) -o $(ISRCS) $(INTERFACEPATH)
$(CC) -c $(CCSHARED) $(CPPFLAGS) $(CFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
$(JAVALDSHARED) $(CFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
@@ -585,7 +585,7 @@ java: $(SRCDIR_SRCS)
# ----------------------------------------------------------------
java_cpp: $(SRCDIR_SRCS)
- $(SWIG) -java -c++ $(SWIGOPT) -o $(ICXXSRCS) $(realpath $(INTERFACEPATH))
+ $(SWIG) -java -c++ $(SWIGOPT) -o $(ICXXSRCS) $(INTERFACEPATH)
$(CXX) -c $(CCSHARED) $(CPPFLAGS) $(CXXFLAGS) $(JAVACFLAGS) $(SRCDIR_SRCS) $(SRCDIR_CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
$(JAVACXXSHARED) $(CXXFLAGS) $(LDFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO)
@@ -1373,7 +1373,7 @@ csharp_cpp: $(SRCDIR_SRCS)
# ----------------------------------------------------------------
ifneq (,$(SRCDIR))
-SRCDIR_CSHARPSRCS = $(wildcard $(addprefix $(SRCDIR),$(CSHARPSRCS)))
+SRCDIR_CSHARPSRCS = $(addprefix $(SRCDIR),$(CSHARPSRCS))
else
SRCDIR_CSHARPSRCS =
endif
View
16 Examples/test-suite/java/preproc_line_file_runme.java
@@ -13,13 +13,21 @@
private static void test_file(String file, String suffix) throws Throwable
{
- String FILENAME_WINDOWS = "Examples\\test-suite\\preproc_line_file.i";
- String FILENAME_UNIX = "Examples/test-suite/preproc_line_file.i";
+// For swig-3.0.1 and earlier
+// String FILENAME_WINDOWS = "Examples\\test-suite\\preproc_line_file.i";
+// String FILENAME_UNIX = "Examples/test-suite/preproc_line_file.i";
+
+ String FILENAME_WINDOWS2 = "Examples\\test-suite\\java\\..\\preproc_line_file.i";
+ String FILENAME_UNIX2 = "Examples/test-suite/java/../preproc_line_file.i";
+
+ String FILENAME_WINDOWS3 = "..\\.\\..\\preproc_line_file.i";
+ String FILENAME_UNIX3 = ".././../preproc_line_file.i";
// We don't test for exact equality here because the file names are relative to the build directory, which can be different from the source directory,
// under Unix. But they do need to end with the same path components.
- if (!file.endsWith(FILENAME_UNIX + suffix) && !file.endsWith(FILENAME_WINDOWS + suffix))
- throw new RuntimeException("file \"" + file + "\" doesn't end with " + FILENAME_UNIX + suffix);
+ if (!file.endsWith(FILENAME_UNIX2 + suffix) && !file.endsWith(FILENAME_WINDOWS2 + suffix) &&
+ !file.endsWith(FILENAME_UNIX3 + suffix) && !file.endsWith(FILENAME_WINDOWS3 + suffix))
+ throw new RuntimeException("file \"" + file + "\" doesn't end with " + FILENAME_UNIX2 + suffix + " or " + FILENAME_UNIX3 + suffix);
}
public static void main(String argv[]) throws Throwable

0 comments on commit 7871975

Please sign in to comment.
Something went wrong with that request. Please try again.