From dcc37563418402efaa0cf68860232bbe74d439b7 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 7 May 2012 17:02:51 +0000 Subject: [PATCH] Make C example makefiles more standard. Note that valgrind can be used via the RUNTOOL env variable, see the docs on running the test-suite. From: William S Fulton git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@13041 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/c/class/Makefile | 10 +--------- Examples/c/exception/Makefile | 10 +--------- Examples/c/simple/Makefile | 10 +--------- Examples/c/std_vector/Makefile | 10 +--------- 4 files changed, 4 insertions(+), 36 deletions(-) diff --git a/Examples/c/class/Makefile b/Examples/c/class/Makefile index fb2879087..65ed8bcfb 100644 --- a/Examples/c/class/Makefile +++ b/Examples/c/class/Makefile @@ -1,11 +1,10 @@ TOP = ../.. -SWIG = $(TOP)/../preinst-swig -debug-module 4 > tree.txt +SWIG = $(TOP)/../preinst-swig CXXSRCS = example.cxx TARGET = example INTERFACE = example.i RUNME = runme.c PROXY = example_proxy.c -MEMTOOL = valgrind --leak-check=full all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ @@ -16,13 +15,6 @@ all:: run: env LD_LIBRARY_PATH=. ./runme -memchk: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXXFLAGS='-g' c_cpp - $(MAKE) -f $(TOP)/Makefile RUNME='$(RUNME)' PROXY='$(PROXY)' \ - TARGET='$(TARGET)' CFLAGS='-g' c_compile - env LD_LIBRARY_PATH=. $(MEMTOOL) ./runme - clean: rm -f *.o *.out *.so *.a *.dll *.dylib *.exe *_wrap* *_proxy* *~ runme diff --git a/Examples/c/exception/Makefile b/Examples/c/exception/Makefile index 5de8ad83b..ce460b949 100644 --- a/Examples/c/exception/Makefile +++ b/Examples/c/exception/Makefile @@ -1,11 +1,10 @@ TOP = ../.. -SWIG = $(TOP)/../preinst-swig -debug-module 4 > tree.txt +SWIG = $(TOP)/../preinst-swig CXXSRCS = example.cxx TARGET = example INTERFACE = example.i RUNME = runme.c PROXY = example_proxy.c -MEMTOOL = valgrind --leak-check=full all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ @@ -16,13 +15,6 @@ all:: run: env LD_LIBRARY_PATH=. ./runme -memchk: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXXFLAGS='-g' c_cpp - $(MAKE) -f $(TOP)/Makefile RUNME='$(RUNME)' PROXY='$(PROXY)' \ - TARGET='$(TARGET)' CFLAGS='-g' c_compile - env LD_LIBRARY_PATH=. $(MEMTOOL) ./runme - clean: rm -f *.o *.out *.so *.a *.dll *.dylib *.exe *_wrap* *_proxy* *~ runme diff --git a/Examples/c/simple/Makefile b/Examples/c/simple/Makefile index eb07f6914..14e8f69b4 100644 --- a/Examples/c/simple/Makefile +++ b/Examples/c/simple/Makefile @@ -1,11 +1,10 @@ TOP = ../.. -SWIG = $(TOP)/../preinst-swig -debug-module 4 > tree.txt +SWIG = $(TOP)/../preinst-swig SRCS = example.c TARGET = example INTERFACE = example.i RUNME = runme.c PROXY = example_proxy.c -MEMTOOL = valgrind --leak-check=full all:: $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ @@ -16,13 +15,6 @@ all:: run: env LD_LIBRARY_PATH=. ./runme -memchk: - $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \ - TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CFLAGS='-g' c - $(MAKE) -f $(TOP)/Makefile RUNME='$(RUNME)' PROXY='$(PROXY)' \ - TARGET='$(TARGET)' CFLAGS='-g' c_compile - env LD_LIBRARY_PATH=. $(MEMTOOL) ./runme - clean: rm -f *.o *.so *.out *.a *.exe *.dll *.dylib *_wrap* *_proxy* *~ runme diff --git a/Examples/c/std_vector/Makefile b/Examples/c/std_vector/Makefile index a029dd0b5..ebcc4ee6b 100644 --- a/Examples/c/std_vector/Makefile +++ b/Examples/c/std_vector/Makefile @@ -1,12 +1,11 @@ TOP = ../.. -SWIG = $(TOP)/../preinst-swig -debug-module 4 > tree.txt +SWIG = $(TOP)/../preinst-swig CXXSRCS = example.cxx TARGET = example INTERFACE = example.i RUNME = runme.c PROXY = example_proxy.c INCLUDES = -MEMTOOL = valgrind --leak-check=full all:: $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ @@ -17,13 +16,6 @@ all:: run: env LD_LIBRARY_PATH=. ./runme -memchk: - $(MAKE) -f $(TOP)/Makefile CXXSRCS='$(CXXSRCS)' SWIG='$(SWIG)' \ - TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' CXXFLAGS='-g' INCLUDES='$(INCLUDES)' c_cpp - $(MAKE) -f $(TOP)/Makefile RUNME='$(RUNME)' PROXY='$(PROXY)' \ - TARGET='$(TARGET)' CFLAGS='-g' c_compile - env LD_LIBRARY_PATH=. $(MEMTOOL) ./runme - clean: rm -f *.o *.out *.so *.a *.dll *.dylib *.exe *_wrap* *_proxy* *~ runme