Replace ; with && where appropriate. This fixes the makefiles so that Make correctly errors out rather than blindly carrying on when some error occurs.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5731 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-02-20 22:57:23 +00:00
commit d3d9210bd0
15 changed files with 66 additions and 66 deletions

View file

@ -5,10 +5,10 @@ OPT =
INSTALL = ../install-sh -c INSTALL = ../install-sh -c
INSTALL_DATA = ${INSTALL} -m 644 INSTALL_DATA = ${INSTALL} -m 644
SHELL = /bin/sh SHELL = /bin/sh
all: all:
cd Lib; $(MAKE) OPT="$(OPT)" cd Lib && $(MAKE) OPT="$(OPT)"
install: install:
$(INSTALL_DATA) Include/gifplot.h $(prefix)/include/gifplot.h $(INSTALL_DATA) Include/gifplot.h $(prefix)/include/gifplot.h
@ -17,7 +17,7 @@ install:
clean:: clean::
rm -f *.@OBJEXT@ *~ libgifplot.a *_wrap* *_man* rm -f *.@OBJEXT@ *~ libgifplot.a *_wrap* *_man*
cd Lib; $(MAKE) clean cd Lib && $(MAKE) clean
rm -f config.log config.status config.cache rm -f config.log config.status config.cache
check: all check: all

View file

@ -550,12 +550,12 @@ OCAMLMKTOP=@OCAMLMKTOP@ $(SWIGWHERE)
NOLINK ?= false NOLINK ?= false
OCAMLPP= -pp "camlp4o ./swigp4.cmo" OCAMLPP= -pp "camlp4o ./swigp4.cmo"
OCAMLCORE=\ OCAMLCORE=\
rm -rf swig.mli swig.ml swigp4.ml ;\ rm -rf swig.mli swig.ml swigp4.ml && \
$(SWIG) -ocaml -co swig.mli 2>/dev/null ; \ $(SWIG) -ocaml -co swig.mli 2>/dev/null && \
$(SWIG) -ocaml -co swig.ml 2>/dev/null ; \ $(SWIG) -ocaml -co swig.ml 2>/dev/null && \
$(SWIG) -ocaml -co swigp4.ml 2>/dev/null ; \ $(SWIG) -ocaml -co swigp4.ml 2>/dev/null && \
$(OCC) -c swig.mli ; \ $(OCC) -c swig.mli && \
$(OCC) -c swig.ml ; \ $(OCC) -c swig.ml && \
$(OCC) -I `camlp4 -where` -pp "camlp4o pa_extend.cmo q_MLast.cmo" \ $(OCC) -I `camlp4 -where` -pp "camlp4o pa_extend.cmo q_MLast.cmo" \
-c swigp4.ml -c swigp4.ml

View file

@ -20,17 +20,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) && \
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) && \
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) && \
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -1,6 +1,6 @@
####################################################################### #######################################################################
# $Header$ # $Header$
# Makefile for csharp test-suite # Makefile for C# test-suite
####################################################################### #######################################################################
LANGUAGE = csharp LANGUAGE = csharp
@ -20,17 +20,17 @@ SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) -package $*
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
(cd $*; $(swig_and_compile_cpp); ); \ (cd $* && $(swig_and_compile_cpp); ) && \
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
(cd $*; $(swig_and_compile_c); ); \ (cd $* && $(swig_and_compile_c); ) && \
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
(cd $*; $(swig_and_compile_multi_cpp); ); \ (cd $* && $(swig_and_compile_multi_cpp); ) && \
$(run_testcase) $(run_testcase)
# Makes a directory for the testcase if it does not exist # Makes a directory for the testcase if it does not exist
@ -44,18 +44,18 @@ setup = \
mkdir $*; \ mkdir $*; \
fi; fi;
# Compiles csharp files then runs the testcase. A testcase is only run if # Compiles C# files then runs the testcase. A testcase is only run if
# a file is found which has _runme.cs appended after the testcase name. # a file is found which has _runme.cs appended after the testcase name.
# Note CSharp uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows and SHLIB_PATH on HPUX. # Note C# uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows and SHLIB_PATH on HPUX.
run_testcase = \ run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
$(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \ $(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \
CSHARPFLAGS='-nologo -out:$*_runme.exe' \ CSHARPFLAGS='-nologo -out:$*_runme.exe' \
CSHARPSRCS='`$(CSHARPCYGPATH_W) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` \ CSHARPSRCS='`$(CSHARPCYGPATH_W) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` \
$*$(CSHARPPATHSEPARATOR)*.cs' csharp_compile; \ $*$(CSHARPPATHSEPARATOR)*.cs' csharp_compile && \
env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" $(INTERPRETER) $*_runme.exe; ) \ env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" $(INTERPRETER) $*_runme.exe; ) \
else ( \ else ( \
cd $*; \ cd $* && \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \ $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \
CSHARPFLAGS='-nologo -t:module -out:$*.netmodule' \ CSHARPFLAGS='-nologo -t:module -out:$*.netmodule' \
CSHARPSRCS='*.cs' csharp_compile; ); \ CSHARPSRCS='*.cs' csharp_compile; ); \

View file

@ -21,17 +21,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) && \
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) && \
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) && \
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -33,17 +33,17 @@ SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) -package $*
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
(cd $*; $(swig_and_compile_cpp); ); \ (cd $*; $(swig_and_compile_cpp); ) && \
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
(cd $*; $(swig_and_compile_c); ); \ (cd $*; $(swig_and_compile_c); ) && \
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
(cd $*; $(swig_and_compile_multi_cpp); ); \ (cd $*; $(swig_and_compile_multi_cpp); ) && \
$(run_testcase) $(run_testcase)
# Makes a directory for the testcase if it does not exist # Makes a directory for the testcase if it does not exist
@ -61,9 +61,9 @@ setup = \
# a file is found which has _runme.java appended after the testcase name. # a file is found which has _runme.java appended after the testcase name.
# Note Java uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows, SHLIB_PATH on HPUX and DYLD_LIBRARY_PATH on Mac OS X. # Note Java uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows, SHLIB_PATH on HPUX and DYLD_LIBRARY_PATH on Mac OS X.
run_testcase = \ run_testcase = \
(cd $*; javac *.java; ); \ (cd $* && javac *.java; ) && \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
javac -d . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ javac -d . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_LIBRARY_PATH="$*:$$DYLD_LIBRARY_PATH" java $*\_runme;) \ env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_LIBRARY_PATH="$*:$$DYLD_LIBRARY_PATH" java $*\_runme;) \
fi; fi;

View file

@ -17,17 +17,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) && \
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) && \
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) && \
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -15,7 +15,7 @@ C_TEST_CASES =
run_testcase = \ run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
ocamlc -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ ocamlc -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
ocamlc swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$*\.cmo $(srcdir)/$*\_runme.cmo $(srcdir)/$*\_wrap.o ; \ ocamlc swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$*\.cmo $(srcdir)/$*\_runme.cmo $(srcdir)/$*\_wrap.o && \
./runme) ; \ ./runme) ; \
fi ; fi ;
@ -44,7 +44,7 @@ include $(srcdir)/../common.mk
%.cpptest: %.cpptest:
echo $@ >> testing echo $@ >> testing
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ) ; \ ($(swig_and_compile_cpp); ) && \
$(run_testcase) \ $(run_testcase) \
if [ -f $(@:%.cpptest=%_wrap.o) ] ; then \ if [ -f $(@:%.cpptest=%_wrap.o) ] ; then \
echo $@ >> success ; \ echo $@ >> success ; \
@ -53,7 +53,7 @@ include $(srcdir)/../common.mk
%.ctest: %.ctest:
echo $@ >> testing echo $@ >> testing
$(setup) \ $(setup) \
($(swig_and_compile_c); ) ; \ ($(swig_and_compile_c); ) && \
$(run_testcase) \ $(run_testcase) \
if [ -f $(@:%.ctest=%_wrap.o) ] ; then \ if [ -f $(@:%.ctest=%_wrap.o) ] ; then \
echo $@ >> success ; \ echo $@ >> success ; \
@ -62,7 +62,7 @@ include $(srcdir)/../common.mk
%.multicpptest: %.multicpptest:
echo $@ >> testing echo $@ >> testing
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ) ; \ ($(swig_and_compile_multi_cpp); ) && \
$(run_testcase) \ $(run_testcase) \
if [ -f $(@:%.multicpptest=%_a_wrap.o) ] ; then \ if [ -f $(@:%.multicpptest=%_a_wrap.o) ] ; then \
echo $@ >> success ; \ echo $@ >> success ; \

View file

@ -17,17 +17,17 @@ SWIGOPT = -shadow -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) && \
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) && \
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) && \
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -42,17 +42,17 @@ missingtests: missingcpptests missingctests
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) &&\
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) &&\
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) &&\
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -17,17 +17,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) &&\
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) &&\
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) &&\
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -17,17 +17,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) &&\
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) &&\
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) &&\
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -17,17 +17,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) &&\
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) &&\
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) &&\
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -17,17 +17,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests # Rules for the different types of tests
%.cpptest: %.cpptest:
$(setup) \ $(setup) \
($(swig_and_compile_cpp); ); \ ($(swig_and_compile_cpp); ) &&\
$(run_testcase) $(run_testcase)
%.ctest: %.ctest:
$(setup) \ $(setup) \
($(swig_and_compile_c); ); \ ($(swig_and_compile_c); ) &&\
$(run_testcase) $(run_testcase)
%.multicpptest: %.multicpptest:
$(setup) \ $(setup) \
($(swig_and_compile_multi_cpp); ); \ ($(swig_and_compile_multi_cpp); ) &&\
$(run_testcase) $(run_testcase)
# Runs the testcase. A testcase is only run if # Runs the testcase. A testcase is only run if

View file

@ -20,10 +20,10 @@ RUNTIME = Runtime
swig: source swig.spec swig: source swig.spec
source: source:
@cd $(SOURCE); $(MAKE) @cd $(SOURCE) && $(MAKE)
runtime: runtime:
@cd $(RUNTIME); $(MAKE) @cd $(RUNTIME) && $(MAKE)
swig.spec: $(srcdir)/swig.spec.in config.status swig.spec: $(srcdir)/swig.spec.in config.status
@CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=swig.spec $(SHELL) ./config.status @CONFIG_HEADERS= CONFIG_LINKS= CONFIG_FILES=swig.spec $(SHELL) ./config.status
@ -141,7 +141,7 @@ check-%-test-suite:
gifplot-library: gifplot-library:
@echo $(ACTION)ing Examples/GIFPlot/Lib @echo $(ACTION)ing Examples/GIFPlot/Lib
@cd Examples/GIFPlot/Lib ; $(MAKE) -k -s $(ACTION) @cd Examples/GIFPlot/Lib && $(MAKE) -k -s $(ACTION)
check-gifplot: \ check-gifplot: \
check-tcl-gifplot \ check-tcl-gifplot \
@ -231,12 +231,12 @@ clean-objects: clean-source clean-runtime
clean-source: clean-source:
@echo cleaning Source @echo cleaning Source
@cd $(SOURCE); $(MAKE) -s clean @cd $(SOURCE) && $(MAKE) -s clean
@rm -f $(TARGET) @rm -f $(TARGET)
clean-runtime: clean-runtime:
@echo cleaning Runtime @echo cleaning Runtime
@cd $(RUNTIME); $(MAKE) -s clean @cd $(RUNTIME) && $(MAKE) -s clean
clean-examples: clean-examples:
@$(MAKE) -k -s check-examples ACTION=clean @$(MAKE) -k -s check-examples ACTION=clean
@ -269,12 +269,12 @@ distclean-objects: distclean-source distclean-runtime
distclean-source: distclean-source:
@echo dist cleaning Source @echo dist cleaning Source
@cd $(SOURCE); $(MAKE) -s distclean @cd $(SOURCE) && $(MAKE) -s distclean
@rm -f $(TARGET) @rm -f $(TARGET)
distclean-runtime: distclean-runtime:
@echo dist cleaning Runtime @echo dist cleaning Runtime
@cd $(RUNTIME); $(MAKE) -s distclean @cd $(RUNTIME) && $(MAKE) -s distclean
distclean-test-suite: distclean-test-suite:
@echo dist cleaning Examples/test-suite @echo dist cleaning Examples/test-suite
@ -341,7 +341,7 @@ install-lib:
do \ do \
dst=$(DESTDIR)$(SWIG_LIB)/$$lang; \ dst=$(DESTDIR)$(SWIG_LIB)/$$lang; \
$(MKINSTDIRS) $$dst; \ $(MKINSTDIRS) $$dst; \
( cd $(srcdir)/Lib/$$lang; \ ( cd $(srcdir)/Lib/$$lang && \
doti="`ls *.i 2>/dev/null`"; \ doti="`ls *.i 2>/dev/null`"; \
dotswg="`ls *.swg 2>/dev/null`"; \ dotswg="`ls *.swg 2>/dev/null`"; \
if [ -f extra-install.list ]; then \ if [ -f extra-install.list ]; then \
@ -360,7 +360,7 @@ install-lib:
install-runtime: install-runtime:
@cd $(RUNTIME); $(MAKE) install @cd $(RUNTIME) && $(MAKE) install
install-m4: install-m4:
@ -379,18 +379,18 @@ uninstall: uninstall-main uninstall-lib uninstall-m4
uninstall-main: uninstall-main:
@echo "Uninstalling $(BIN_DIR)/$(TARGET)" @echo "Uninstalling $(BIN_DIR)/$(TARGET)"
rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET); rm -f $(DESTDIR)$(BIN_DIR)/$(TARGET)
uninstall-lib: uninstall-lib:
@echo "Uninstalling the SWIG library" @echo "Uninstalling the SWIG library"
rm -rf $(DESTDIR)$(SWIG_LIB)/; rm -rf $(DESTDIR)$(SWIG_LIB)/
uninstall-runtime: uninstall-runtime:
@cd $(RUNTIME); $(MAKE) uninstall @cd $(RUNTIME) && $(MAKE) uninstall
uninstall-m4: uninstall-m4:
@echo "Uninstalling $(M4_INSTALL_DIR)/swig.m4" @echo "Uninstalling $(M4_INSTALL_DIR)/swig.m4"
rm -f $(M4_INSTALL_DIR)/swig.m4; rm -f $(M4_INSTALL_DIR)/swig.m4
############################################################################ ############################################################################
# DIST and other maintenance # DIST and other maintenance