From 7b581339c911d23b31db19b233acbe41093dd87c Mon Sep 17 00:00:00 2001 From: Mark <> Date: Tue, 10 Feb 2004 17:06:11 +0000 Subject: [PATCH] fix make clean not cleaning some files and added new make distclean which will restore everything back to the original distribution --- Makefile.in | 32 +++++++++++--------------------- adns/Makefile | 5 ++++- curl/Makefile.in | 5 ++++- dl/Makefile | 9 +++++++++ dl/Makefile.inc | 5 ++++- keeper/Makefile | 3 +++ pcre/Makefile.in | 5 ++++- sqlsrv/Makefile.in | 5 ++++- tools/Makefile.in | 5 ++++- tools/cfgtool/Makefile | 3 +++ 10 files changed, 50 insertions(+), 27 deletions(-) diff --git a/Makefile.in b/Makefile.in index 3a3965fd..c9359034 100644 --- a/Makefile.in +++ b/Makefile.in @@ -75,7 +75,17 @@ clean: (cd pcre; $(MAKE) $@) (cd curl; $(MAKE) $@) (cd sqlsrv; $(MAKE) $@) - $(RM) *.o neostats *.cache Makefile config.h Makefile.inc *.log *.a + $(RM) *.o neostats *.cache Makefile config.h Makefile.inc *.log *.a *.d *.exe + +distclean: + (cd dl; $(MAKE) $@) + (cd adns; $(MAKE) $@) + (cd keeper; $(MAKE) $@) + (cd tools; $(MAKE) $@) + (cd pcre; $(MAKE) $@) + (cd curl; $(MAKE) $@) + (cd sqlsrv; $(MAKE) $@) + $(RM) *.o neostats *.cache Makefile config.h Makefile.inc *.log *.a *.d *.exe config.status neostats: $(OBJS) $(CC) $(LDFLAGS) $(OBJS) $(ADNS_OBJS) $(KEEPER_OBJS) $(PCRE_OBJS) curl/libcurl.a $(EXTRA_LDFLAGS) -o $@ @@ -149,23 +159,3 @@ dist: # Catch any changes in compilation options at the top of this file $(OBJS): Makefile Makefile.inc - -dns.o: dns.c stats.h adns/adns.h list.h hash.h config.h log.h -chans.o: chans.c stats.h adns/adns.h list.h hash.h config.h dl.h log.h -dotconf.o: dotconf.c dotconf.h -services.o: services.c stats.h adns/adns.h list.h hash.h config.h dl.h log.h -main.o: main.c stats.h adns/adns.h list.h hash.h config.h dl.h conf.h log.h -sock.o: sock.c stats.h adns/adns.h list.h hash.h config.h dl.h conf.h log.h -conf.o: conf.c stats.h adns/adns.h list.h hash.h config.h dotconf.h conf.h dl.h log.h -ircd.o: ircd.c stats.h adns/adns.h list.h hash.h config.h dl.h log.h -timer.o: timer.c stats.h adns/adns.h list.h hash.h config.h dl.h log.h -users.o: users.c stats.h adns/adns.h list.h hash.h config.h dl.h log.h -ns_help.o: ns_help.c stats.h adns/adns.h list.h hash.h config.h -dl.o: dl.c dl.h hash.h stats.h adns/adns.h list.h config.h log.h -list.o: list.c list.h -hash.o: hash.c hash.h -server.o: server.c stats.h adns/adns.h list.h hash.h config.h log.h -keeper.o: keeper.c stats.h adns/adns.h list.h hash.h config.h keeper/keeper.h conf.h log.h -log.o: log.c stats.h adns/adns.h list.h hash.h config.h conf.h log.h -transfer.o: transfer.c transfer.h stats.h list.h -exclude.o: exclude.c exclude.h diff --git a/adns/Makefile b/adns/Makefile index 55ccc061..7a7e1823 100644 --- a/adns/Makefile +++ b/adns/Makefile @@ -11,7 +11,10 @@ all: $(OBJS) $(CC) $(CFLAGS) $(INCLUDES) -c $< clean: - $(RM) *.o *.lo *.so *.a + $(RM) *.o *.lo *.so *.a *.exe config.h + +distclean: + $(RM) *.o *.lo *.so *.a *.exe config.h depend: $(CC) -MM $(INCLUDES) $(CFLAGS) $(SRCS) > .depend diff --git a/curl/Makefile.in b/curl/Makefile.in index 75d9a21b..2a2385af 100644 --- a/curl/Makefile.in +++ b/curl/Makefile.in @@ -27,7 +27,10 @@ redoparser: mv -f y.tab.c getdate.c clean: - /bin/rm -rf *.o config.h Makefile mycurl-config + /bin/rm -rf *.o config.h Makefile mycurl-config *.a *.log + +distclean: + /bin/rm -rf *.o config.h Makefile mycurl-config *.a *.log config.status configure.lineno install: diff --git a/dl/Makefile b/dl/Makefile index b7352938..6698e0f9 100644 --- a/dl/Makefile +++ b/dl/Makefile @@ -22,3 +22,12 @@ all clean :: echo "<=== $(SDP)modules/$$i"; \ fi; \ done + +all distclean :: + @for i in $(MODULES) ""; do \ + if [ "x$$i" != "x" ]; then \ + echo "===> $(SDP)modules/$$i"; \ + (cd $$i && $(MAKE) $@) || exit 1; \ + echo "<=== $(SDP)modules/$$i"; \ + fi; \ + done diff --git a/dl/Makefile.inc b/dl/Makefile.inc index bb2024e9..dbdb8246 100755 --- a/dl/Makefile.inc +++ b/dl/Makefile.inc @@ -28,7 +28,10 @@ $(TARGET): $(OBJS) # How to clean up files created by the build process clean: - $(RM) *.o *.lo *.so *.d + $(RM) *.o *.lo *.so *.d *.dll + +distclean: + $(RM) *.o *.lo *.so *.d *.dll # How to install this module # TARGET will be that defined for building in the Module makefile diff --git a/keeper/Makefile b/keeper/Makefile index 405807b9..85ffaa98 100644 --- a/keeper/Makefile +++ b/keeper/Makefile @@ -14,6 +14,9 @@ all: $(OBJS) clean: $(RM) *.o *.lo *.so *.a +distclean: + $(RM) *.o *.lo *.so *.a + depend: $(CC) -MM $(INCLUDES) $(KEEPERCFLAGS) $(SRCS) > .depend diff --git a/pcre/Makefile.in b/pcre/Makefile.in index 98da886b..27e17f52 100644 --- a/pcre/Makefile.in +++ b/pcre/Makefile.in @@ -22,7 +22,10 @@ chartables.c: dftables ./dftables >./chartables.c clean: - $(RM) *.o Makefile dftables ../pcre.h chartables.c config.h + $(RM) *.o Makefile dftables ../pcre.h chartables.c config.h *.exe + +distclean: + $(RM) *.o Makefile dftables ../pcre.h chartables.c config.h *.exe install: diff --git a/sqlsrv/Makefile.in b/sqlsrv/Makefile.in index 9704ba61..7b2d0fab 100755 --- a/sqlsrv/Makefile.in +++ b/sqlsrv/Makefile.in @@ -55,5 +55,8 @@ dist: done clean: - rm -rf *.o lib* parse.output parse.save + rm -rf *.o lib* Makefile parse.output parse.save + +distclean: + rm -rf *.o lib* Makefile parse.output parse.save diff --git a/tools/Makefile.in b/tools/Makefile.in index 5a52aabb..db6575c6 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -22,8 +22,11 @@ configtool: clean: (cd cfgtool; $(MAKE) $@) - $(RM) *.o *.lo *.so *.a kptool Makefile + $(RM) *.o *.lo *.so *.a kptool Makefile *.exe +distclean: + (cd cfgtool; $(MAKE) $@) + $(RM) *.o *.lo *.so *.a kptool Makefile *.exe install: $(INSTALL_PROGRAM) kptool @prefix@ diff --git a/tools/cfgtool/Makefile b/tools/cfgtool/Makefile index d80e0cb0..319690cc 100644 --- a/tools/cfgtool/Makefile +++ b/tools/cfgtool/Makefile @@ -21,6 +21,9 @@ configtool: $(OBJS) clean: $(RM) *.o *.lo *.so *.a configtool +distclean: + $(RM) *.o *.lo *.so *.a configtool + install: depend: