diff --git a/Examples/test-suite/common.mk b/Examples/test-suite/common.mk index 4bd14d3fc3..4f28e73d83 100644 --- a/Examples/test-suite/common.mk +++ b/Examples/test-suite/common.mk @@ -74,6 +74,9 @@ SCRIPTDIR = $(srcdir) # This can be set to ":" on make command line to suppress progress messages. ECHO_PROGRESS := echo +# Portable dos2unix / fromdos for stripping CR +FROMDOS = tr -d '\r' + # Regenerate Makefile if Makefile.in or config.status have changed. Makefile: $(srcdir)/Makefile.in ../../../config.status cd ../../../ && $(SHELL) ./config.status $(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE)/Makefile @@ -969,8 +972,7 @@ swig_and_compile_c = \ $(LANGUAGE)$(VARIANT) swig_and_compile_multi_cpp = \ - for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \ - f=`printf $${f} | grep -v '^$$'`; \ + for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list | $(FROMDOS)` ; do \ $(call swig_and_compile_cpp_helper,$${f},'$(SWIGOPT)'); \ done diff --git a/Examples/test-suite/errors/Makefile.in b/Examples/test-suite/errors/Makefile.in index 347bf38581..980df0e54f 100644 --- a/Examples/test-suite/errors/Makefile.in +++ b/Examples/test-suite/errors/Makefile.in @@ -54,9 +54,8 @@ $(DOXYGEN_ERROR_TEST_CASES): SWIGOPT += -doxygen MODULE_OPTION=-module $* nomodule.ctest: MODULE_OPTION = -# Portable dos2unix / todos for stripping CR -TODOS = tr -d '\r' -#TODOS = sed -e 's/\r$$//' # On Mac OS X behaves as if written 's/r$$//' +# Portable dos2unix / fromdos for stripping CR +FROMDOS = tr -d '\r' # strip source directory from output, so that diffs compare STRIP_SRCDIR = sed -e 's|\\|/|g' -e 's|^$(SRCDIR)||' @@ -64,12 +63,12 @@ STRIP_SRCDIR = sed -e 's|\\|/|g' -e 's|^$(SRCDIR)||' # Rules for the different types of tests %.cpptest: echo "$(ACTION)ing errors testcase $*" - -$(SWIGINVOKE) -c++ -python -Wall -Fstandard $(MODULE_OPTION) $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) + -$(SWIGINVOKE) -c++ -python -Wall -Fstandard $(MODULE_OPTION) $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(FROMDOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) $(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT) %.ctest: echo "$(ACTION)ing errors testcase $*" - -$(SWIGINVOKE) -python -Wall -Fstandard $(MODULE_OPTION) $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(TODOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) + -$(SWIGINVOKE) -python -Wall -Fstandard $(MODULE_OPTION) $(SWIGOPT) $(SRCDIR)$*.i 2>&1 | $(FROMDOS) | $(STRIP_SRCDIR) > $*.$(ERROR_EXT) $(COMPILETOOL) diff -c $(SRCDIR)$*.stderr $*.$(ERROR_EXT) %.clean: