Permalink
Browse files

Fix MinGW make distclean and add <file>.in dependencies.

This patch fixes the crash in MinGW make distclean. The problem
was that vpi/ and driver-vpi/ were being called twice and the
MinGW make was failing on the second call since the Makefile
was already removed.

Add a dependency on config.h and _pli_types.h in the make all
target. It is likely that only _pli_types.h was needed, but
this makes it clear that they need to be rebuilt if the .in
files change.

The lower directories that depend on the top level config.status
now have a target to rebuild the local Makefile file it the
corresponding Makefile.in changes.
  • Loading branch information...
1 parent b6c4560 commit f1e2f373ae8bd50fd29c084ec6555770023d9ef0 @caryr caryr committed with Dec 12, 2008
Showing with 35 additions and 5 deletions.
  1. +17 −5 Makefile.in
  2. +3 −0 driver-vpi/Makefile.in
  3. +3 −0 driver/Makefile.in
  4. +3 −0 ivlpp/Makefile.in
  5. +3 −0 tgt-null/Makefile.in
  6. +3 −0 tgt-pal/Makefile.in
  7. +3 −0 tgt-verilog/Makefile.in
View
@@ -82,7 +82,7 @@ CXXFLAGS = -Wall @CXXFLAGS@
PICFLAGS = @PICFLAG@
LDFLAGS = @rdynamic@ @LDFLAGS@
-all: dep version.h ivl@EXEEXT@
+all: dep config.h _pli_types.h version.h ivl@EXEEXT@
for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) VERSION=$(VERSION) $@); done
for dir in ivlpp ; \
do (cd $$dir ; $(MAKE) VERSION=$(VERSION) $@); done
@@ -106,8 +106,11 @@ check: all
clean:
for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done
- for dir in vpi ivlpp tgt-verilog tgt-pal driver driver-vpi; \
+ for dir in ivlpp tgt-verilog tgt-pal driver; \
do (cd $$dir ; $(MAKE) $@); done
+ifeq (@MINGW32@,no)
+ (cd driver-vpi ; $(MAKE) $@)
+endif
rm -f *.o parse.cc parse.cc.output 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
@@ -116,8 +119,11 @@ clean:
distclean: clean
for dir in $(SUBDIRS); do (cd $$dir ; $(MAKE) $@); done
- for dir in vpi ivlpp tgt-verilog tgt-pal driver driver-vpi; \
+ for dir in ivlpp tgt-verilog tgt-pal driver; \
do (cd $$dir ; $(MAKE) $@); done
+ifeq (@MINGW32@,no)
+ (cd driver-vpi ; $(MAKE) $@)
+endif
rm -f Makefile config.status config.log config.cache config.h
rm -f _pli_types.h
@@ -142,8 +148,14 @@ PExpr.o PGate.o PGenerate.o PScope.o PSpec.o \
PTask.o PUdp.o PFunction.o PWire.o Statement.o AStatement.o StringHeap.o \
$(FF) $(TT)
-Makefile: Makefile.in config.h.in config.status
- ./config.status
+Makefile: $(srcdir)/Makefile.in config.status
+ ./config.status --file=$@
+
+config.h: $(srcdir)/config.h.in config.status
+ ./config.status --header=$@
+
+_pli_types.h: $(srcdir)/_pli_types.h.in config.status
+ ./config.status --header=$@
ifeq (@WIN32@,yes)
@@ -58,6 +58,9 @@ clean:
distclean: clean
rm -f Makefile
+Makefile: $(srcdir)/Makefile.in ../config.status
+ ../config.status --file=$@
+
O = main.o res.o
iverilog-vpi@EXEEXT@: $O
View
@@ -57,6 +57,9 @@ clean:
distclean: clean
rm -f Makefile
+Makefile: $(srcdir)/Makefile.in ../config.status
+ ../config.status --file=$@
+
O = main.o substit.o cflexor.o cfparse.o
iverilog@EXEEXT@: $O
View
@@ -51,6 +51,9 @@ clean:
distclean: clean
rm -f Makefile
+Makefile: $(srcdir)/Makefile.in ../config.status
+ ../config.status --file=$@
+
O = main.o lexor.o
ivlpp@EXEEXT@: $O
@@ -71,6 +71,9 @@ clean:
distclean: clean
rm -f Makefile config.status config.log config.cache
+Makefile: $(srcdir)/Makefile.in ../config.status
+ ../config.status --file=$@
+
check: all
install: all installdirs $(libdir)/ivl$(suffix)/null.tgt $(INSTALL_DOC) $(libdir)/ivl$(suffix)/null.conf $(libdir)/ivl$(suffix)/null-s.conf
View
@@ -68,6 +68,9 @@ clean:
distclean: clean
rm -f Makefile
+Makefile: $(srcdir)/Makefile.in ../config.status
+ ../config.status --file=$@
+
install: all installdirs $(libdir)/ivl/pal.tgt
$(libdir)/ivl/pal.tgt: ./pal.tgt
@@ -67,6 +67,9 @@ clean:
distclean: clean
rm -f Makefile
+Makefile: $(srcdir)/Makefile.in ../config.status
+ ../config.status --file=$@
+
check: all
install: all installdirs $(libdir)/ivl/verilog.tgt \

0 comments on commit f1e2f37

Please sign in to comment.