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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
#######################################################################
# $Header$
# Makefile for csharp test-suite
# Makefile for C# test-suite
#######################################################################
LANGUAGE = csharp
@ -20,17 +20,17 @@ SWIGOPT = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE) -package $*
# Rules for the different types of tests
%.cpptest:
$(setup) \
(cd $*; $(swig_and_compile_cpp); ); \
(cd $* && $(swig_and_compile_cpp); ) && \
$(run_testcase)
%.ctest:
$(setup) \
(cd $*; $(swig_and_compile_c); ); \
(cd $* && $(swig_and_compile_c); ) && \
$(run_testcase)
%.multicpptest:
$(setup) \
(cd $*; $(swig_and_compile_multi_cpp); ); \
(cd $* && $(swig_and_compile_multi_cpp); ) && \
$(run_testcase)
# Makes a directory for the testcase if it does not exist
@ -44,18 +44,18 @@ setup = \
mkdir $*; \
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.
# 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 = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
$(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \
CSHARPFLAGS='-nologo -out:$*_runme.exe' \
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; ) \
else ( \
cd $*; \
cd $* && \
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \
CSHARPFLAGS='-nologo -t:module -out:$*.netmodule' \
CSHARPSRCS='*.cs' csharp_compile; ); \

View file

@ -21,17 +21,17 @@ include $(srcdir)/../common.mk
# Rules for the different types of tests
%.cpptest:
$(setup) \
($(swig_and_compile_cpp); ); \
($(swig_and_compile_cpp); ) && \
$(run_testcase)
%.ctest:
$(setup) \
($(swig_and_compile_c); ); \
($(swig_and_compile_c); ) && \
$(run_testcase)
%.multicpptest:
$(setup) \
($(swig_and_compile_multi_cpp); ); \
($(swig_and_compile_multi_cpp); ) && \
$(run_testcase)
# 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
%.cpptest:
$(setup) \
(cd $*; $(swig_and_compile_cpp); ); \
(cd $*; $(swig_and_compile_cpp); ) && \
$(run_testcase)
%.ctest:
$(setup) \
(cd $*; $(swig_and_compile_c); ); \
(cd $*; $(swig_and_compile_c); ) && \
$(run_testcase)
%.multicpptest:
$(setup) \
(cd $*; $(swig_and_compile_multi_cpp); ); \
(cd $*; $(swig_and_compile_multi_cpp); ) && \
$(run_testcase)
# 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.
# 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 = \
(cd $*; javac *.java; ); \
(cd $* && javac *.java; ) && \
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;) \
fi;

View file

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

View file

@ -15,7 +15,7 @@ C_TEST_CASES =
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
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) ; \
fi ;
@ -44,7 +44,7 @@ include $(srcdir)/../common.mk
%.cpptest:
echo $@ >> testing
$(setup) \
($(swig_and_compile_cpp); ) ; \
($(swig_and_compile_cpp); ) && \
$(run_testcase) \
if [ -f $(@:%.cpptest=%_wrap.o) ] ; then \
echo $@ >> success ; \
@ -53,7 +53,7 @@ include $(srcdir)/../common.mk
%.ctest:
echo $@ >> testing
$(setup) \
($(swig_and_compile_c); ) ; \
($(swig_and_compile_c); ) && \
$(run_testcase) \
if [ -f $(@:%.ctest=%_wrap.o) ] ; then \
echo $@ >> success ; \
@ -62,7 +62,7 @@ include $(srcdir)/../common.mk
%.multicpptest:
echo $@ >> testing
$(setup) \
($(swig_and_compile_multi_cpp); ) ; \
($(swig_and_compile_multi_cpp); ) && \
$(run_testcase) \
if [ -f $(@:%.multicpptest=%_a_wrap.o) ] ; then \
echo $@ >> success ; \

View file

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

View file

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