From 03425d192d4218cd05f696f341dd92991c1df8ac Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Thu, 31 Dec 2015 11:53:46 +0100 Subject: [PATCH] Miscellaneous Makefile issues --- Makefile.in | 1 + spec/example/Makefile.in | 20 +++++++++++--------- src/Makefile.in | 2 +- src/test/Makefile.in | 1 + 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Makefile.in b/Makefile.in index ed3e0ae7..837623f9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -120,6 +120,7 @@ clean: depend: cd src && $(MAKE) $@ + cd spec/example && $(MAKE) $@ distclean: cd src && $(MAKE) $@ diff --git a/spec/example/Makefile.in b/spec/example/Makefile.in index c38be1b8..7bf5e016 100644 --- a/spec/example/Makefile.in +++ b/spec/example/Makefile.in @@ -133,30 +133,32 @@ configure.status: configure depend: (cd $(srcdir) ; awk 'BEGIN{P=1}{if(P)print}/^# Dependencies/{P=0}' Makefile.in > Makefile.in.new ) - (cd $(srcdir) ; gcc -MM -I. -I../../src *.c | \ - sed -e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \ - -e 's? \$$(srcdir)/config\.h? ../../src/config.h?g' \ - -e 's? \.\./\.\./src/getdns/getdns_extra\.h? $$(srcdir)/../../src/getdns/getdns_extra.h?g' \ + (blddir=`pwd`; cd $(srcdir) ; gcc -MM -I. -I../../src -I"$$blddir"/../../src *.c | \ + sed -e "s? $$blddir/? ?g" \ + -e 's? \([a-z_-]*\)\.\([ch]\)? $$(srcdir)/\1.\2?g' \ + -e 's? \$$(srcdir)/\.\./\.\./src/config\.h? ../../src/config.h?g' \ + -e 's? $$(srcdir)/\.\./\.\./src/getdns/getdns_extra\.h? ../../src/getdns/getdns_extra.h?g' \ -e 's? \.\./\.\./src/getdns/getdns_ext_libevent\.h? $$(srcdir)/../../src/getdns/getdns_ext_libevent.h?g' \ -e 's? \.\./\.\./src/getdns/getdns_ext_libev\.h? $$(srcdir)/../../src/getdns/getdns_ext_libev.h?g' \ -e 's? \.\./\.\./src/getdns/getdns_ext_libuv\.h? $$(srcdir)/../../src/getdns/getdns_ext_libuv.h?g' \ + -e 's? \.\./\.\./src/debug\.h? $$(srcdir)/../../src/debug.h?g' \ -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' >> Makefile.in.new ) (cd $(srcdir) ; diff Makefile.in.new Makefile.in && rm Makefile.in.new \ - || mv Makefile.in.new Makefile.in ) + || mv Makefile.in.new Makefile.in ) # Dependencies for the examples example-all-functions.lo example-all-functions.o: $(srcdir)/example-all-functions.c $(srcdir)/getdns_libevent.h \ ../../src/config.h ../../src/getdns/getdns.h \ - $(srcdir)/../../src/getdns/getdns_ext_libevent.h $(srcdir)/../../src/getdns/getdns_extra.h + $(srcdir)/../../src/getdns/getdns_ext_libevent.h ../../src/getdns/getdns_extra.h example-reverse.lo example-reverse.o: $(srcdir)/example-reverse.c $(srcdir)/getdns_libevent.h ../../src/config.h \ ../../src/getdns/getdns.h $(srcdir)/../../src/getdns/getdns_ext_libevent.h \ - $(srcdir)/../../src/getdns/getdns_extra.h + ../../src/getdns/getdns_extra.h example-simple-answers.lo example-simple-answers.o: $(srcdir)/example-simple-answers.c $(srcdir)/getdns_libevent.h \ ../../src/config.h ../../src/getdns/getdns.h \ - $(srcdir)/../../src/getdns/getdns_ext_libevent.h $(srcdir)/../../src/getdns/getdns_extra.h + $(srcdir)/../../src/getdns/getdns_ext_libevent.h ../../src/getdns/getdns_extra.h example-synchronous.lo example-synchronous.o: $(srcdir)/example-synchronous.c $(srcdir)/getdns_core_only.h \ ../../src/getdns/getdns.h example-tree.lo example-tree.o: $(srcdir)/example-tree.c $(srcdir)/getdns_libevent.h ../../src/config.h \ ../../src/getdns/getdns.h $(srcdir)/../../src/getdns/getdns_ext_libevent.h \ - $(srcdir)/../../src/getdns/getdns_extra.h + ../../src/getdns/getdns_extra.h diff --git a/src/Makefile.in b/src/Makefile.in index a017c380..a20a9b18 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -167,7 +167,7 @@ clean: distclean : clean cd test && $(MAKE) $@ rmdir test 2>/dev/null || true - rm -f Makefile config.status config.log Doxyfile config.h getdns/Makefile getdns/getdns.h getdns/getdns_extra.h + rm -f Makefile config.status config.log Doxyfile config.h version.c getdns/Makefile getdns/getdns.h getdns/getdns_extra.h rmdir getdns 2>/dev/null || true rmdir extension 2>/dev/null || true rm -Rf autom4te.cache diff --git a/src/test/Makefile.in b/src/test/Makefile.in index 4f2d0859..016b9e22 100644 --- a/src/test/Makefile.in +++ b/src/test/Makefile.in @@ -180,6 +180,7 @@ clean: distclean : clean rm -f scratchpad.c rm -f Makefile config.status config.log + rm -f check_getdns_uv.core check_getdns.core check_getdns_event.core rm -Rf autom4te.cache $(distdir): FORCE