From 633ee85dc2fbe23d5d7054a7cae2171b15d29981 Mon Sep 17 00:00:00 2001 From: Cary R Date: Wed, 26 Jan 2011 15:17:07 -0800 Subject: [PATCH] vhdlpp: update make clean and vpath, add cppcheck target This patch updates the make clean target and modifies the vpath search to match what is done in the main ivl Makefile since this one has the same issues it does. It also adds a cppcheck target and removes the redundant libmisc build target since the vpath already handles this. --- vhdlpp/Makefile.in | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/vhdlpp/Makefile.in b/vhdlpp/Makefile.in index fcdd2529b..7717473fb 100644 --- a/vhdlpp/Makefile.in +++ b/vhdlpp/Makefile.in @@ -24,7 +24,13 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ -VPATH = $(srcdir) +# Look in the appropriate source directory for the C++ files. The one +# exception to this is if we need to rebuild the lexor_keyword.cc file. +# If we do, then we want to use the local version instead of the one is +# $(srcdir). +vpath lexor_keyword.cc . +vpath %.cc $(srcdir)/../libmisc +vpath %.cc $(srcdir) bindir = @bindir@ libdir = @libdir@ @@ -61,13 +67,16 @@ all: dep vhdlpp@EXEEXT@ check: all clean: - rm -f *.o *~ + rm -f *.o *~ parse.cc parse.h lexor.cc parse.output lexor_keyword.cc rm -rf dep vhdlpp@EXEEXT@ distclean: clean rm -f Makefile config.log rm -f stamp-vhdlpp_config-h vhdlpp_config.h +cppcheck: $(O:.o=.cc) + cppcheck --enable=all -f $(INCLUDE_PATH) $^ + Makefile: $(srcdir)/Makefile.in cd ..; ./config.status --file=vhdlpp/$@ @@ -77,10 +86,6 @@ dep: vhdlpp@EXEEXT@: $O $(CXX) -o vhdlpp@EXEEXT@ $(LDFLAGS) $O $(LIBS) -%.o: $(srcdir)/../libmisc/%.cc - $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o - mv $*.d dep/$*.d - %.o: %.cc vhdlpp_config.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) @DEPENDENCY_FLAG@ -c $< -o $*.o mv $*.d dep/$*.d