From 32e30f2d5ba538b6710b0019ccdc9a222987c463 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 11 Mar 2011 13:39:58 -0800 Subject: [PATCH] V0.8: Fix cleanup and cygwin out of source building This patch adds a few missing files to clean/distclean and also fixes the out of source directory building for cygwin/MinGW. --- Makefile.in | 23 +++++++++++++++-------- libveriuser/Makefile.in | 1 + tgt-edif/Makefile.in | 2 +- tgt-vvp/Makefile.in | 1 + vpi/Makefile.in | 1 + vvp/Makefile.in | 8 ++++---- 6 files changed, 23 insertions(+), 13 deletions(-) diff --git a/Makefile.in b/Makefile.in index 916937992..273d960e9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -78,8 +78,8 @@ all: dep ivl@EXEEXT@ # dosify text files. ifeq (@WIN32@,yes) all: dep dosify.exe -dosify.exe: dosify.c - $(CC) -o dosify.exe dosify.c +dosify.exe: $(srcdir)/dosify.c + $(CC) -o dosify.exe $(srcdir)/dosify.c endif # This rule rules the compiler in the trivial hello.vl program to make @@ -107,17 +107,24 @@ clean: for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) $@); done for dir in vpi ivlpp tgt-verilog tgt-stub driver; \ do (cd $$dir ; $(MAKE) $@); done - rm -f *.o parse.cc parse.output parse.h lexor.cc syn-rules.output - rm -f iverilog-vpi.ps iverilog-vpi.pdf + rm -f *.o parse.cc parse.h lexor.cc + rm -f ivl.exp iverilog-vpi.pdf iverilog-vpi.ps parse.output + rm -f syn-rules.output dosify.exe ivl@EXEEXT@ check.vvp rm -f lexor_keyword.cc libivl.a libvpi.a iverilog-vpi syn-rules.cc - rm -rf dep ivl@EXEEXT@ dosify.exe check.vvp + rm -rf dep distclean: clean for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done for tgt in $(TARGETS); do (cd $$tgt ; $(MAKE) $@); done for dir in vpi ivlpp tgt-verilog tgt-stub driver; \ do (cd $$dir ; $(MAKE) $@); done - rm -f Makefile config.status config.log config.cache config.h + rm -f Makefile config.status config.log config.cache + rm -f config.h + rm -f _pli_types.h +ifneq (@srcdir@,.) + rm -f check.conf + rmdir $(SUBDIRS) +endif rm -rf autom4te.cache TT = t-dll.o t-dll-api.o t-dll-expr.o t-dll-proc.o t-xnf.o @@ -148,9 +155,9 @@ ifeq (@WIN32@,yes) # The first step makes an ivl.exe that dlltool can use to make an # export and import library, and the last link makes a, ivl.exe # that really exports the things that the import library imports. -ivl@EXEEXT@: $O ivl.def +ivl@EXEEXT@: $O $(srcdir)/ivl.def $(CXX) -o ivl@EXEEXT@ $O $(dllib) @EXTRALIBS@ - dlltool --dllname ivl@EXEEXT@ --def ivl.def \ + dlltool --dllname ivl@EXEEXT@ --def $(srcdir)/ivl.def \ --output-lib libivl.a --output-exp ivl.exp $(CXX) $(LDFLAGS) -o ivl@EXEEXT@ ivl.exp $O $(dllib) @EXTRALIBS@ else diff --git a/libveriuser/Makefile.in b/libveriuser/Makefile.in index 37be1f2ba..c08f5a055 100644 --- a/libveriuser/Makefile.in +++ b/libveriuser/Makefile.in @@ -91,6 +91,7 @@ clean: distclean: clean rm -f Makefile config.status config.log config.cache + rm -f config.h rm -rf autom4te.cache install:: all installdirs $(libdir64)/libveriuser$(suffix).a $(INSTALL32) diff --git a/tgt-edif/Makefile.in b/tgt-edif/Makefile.in index 31c2c2a91..4a96420ec 100644 --- a/tgt-edif/Makefile.in +++ b/tgt-edif/Makefile.in @@ -92,7 +92,7 @@ Makefile: Makefile.in config.status ./config.status clean: - rm -rf *.o dep edif.tgt + rm -rf *.o dep libedif_tgt.a edif.tgt distclean: clean rm -f Makefile config.status config.log config.cache diff --git a/tgt-vvp/Makefile.in b/tgt-vvp/Makefile.in index fbfa1c1ce..75b3b3d36 100644 --- a/tgt-vvp/Makefile.in +++ b/tgt-vvp/Makefile.in @@ -77,6 +77,7 @@ clean: distclean: clean rm -f Makefile config.status config.log config.cache + rm -f vvp_config.h rm -rf autom4te.cache check: all diff --git a/vpi/Makefile.in b/vpi/Makefile.in index 44147369d..e7a7449c7 100644 --- a/vpi/Makefile.in +++ b/vpi/Makefile.in @@ -112,6 +112,7 @@ clean: distclean: clean rm -f Makefile config.log config.status + rm -f vpi_config.h rm -rf autom4te.cache check: all diff --git a/vvp/Makefile.in b/vvp/Makefile.in index 8e78b56b4..bd361d29d 100644 --- a/vvp/Makefile.in +++ b/vvp/Makefile.in @@ -70,8 +70,8 @@ endif all: dep vvp@EXEEXT@ libvpi.a $(ALL32) clean: - rm -f *.o *~ parse.cc parse.cc.output parse.h lexor.cc tables.cc - rm -f vvp.ps vvp.pdf + rm -f *.o *~ parse.cc parse.output parse.h lexor.cc tables.cc + rm -f vvp.ps vvp.pdf vvp.exp rm -rf dep vvp@EXEEXT@ libvpi.a bin32 distclean: clean @@ -112,9 +112,9 @@ ifeq (@WIN32@,yes) # # To get this to work correctly we must use the suffixed version of the # executable to build the library. -vvp@EXEEXT@ libvpi.a: $O vvp.def +vvp@EXEEXT@ libvpi.a: $O $(srcdir)/vvp.def $(CXX) -o vvp$(suffix)@EXEEXT@ $(LDFLAGS) $O $(dllib) $(LIBS) - dlltool --dllname vvp$(suffix)@EXEEXT@ --def vvp.def \ + dlltool --dllname vvp$(suffix)@EXEEXT@ --def $(srcdir)/vvp.def \ --output-lib libvpi.a --output-exp vvp.exp rm -f vvp$(suffix)@EXEEXT@ $(CXX) -o vvp@EXEEXT@ vvp.exp $(LDFLAGS) $O $(dllib) $(LIBS)