Nmap Development mailing list archives

Re: [PATCH] make clean/distclean not quite clean in libnetutil


From: Michael McTernan <Michael.McTernan.2001 () cs bris ac uk>
Date: Mon, 18 Jun 2012 17:55:55 +0100

On 06/18/2012 04:48 PM, David Fifield wrote:
Okay, it sounds like the bug is really in the makefile for libnetutil
then. Could you make another patch that makes the behavior consistent in
libnetutil and nsock? That is, keep makefile.dep on "clean"; delete it
on "distclean".

Sure. In the patch that follows I had to make a few more things consistent, but the result is like this:

$ ./configure && make &> buildlog
$ find . -name "makefile.dep"
./ncat/makefile.dep
./nping/makefile.dep
./makefile.dep
./nsock/src/makefile.dep
./libnetutil/makefile.dep
$ make clean &> /dev/null
$ find . -name "makefile.dep"
./ncat/makefile.dep
./nping/makefile.dep
./makefile.dep
./nsock/src/makefile.dep
./libnetutil/makefile.dep
$ make distclean &> /dev/null
$ find . -name "makefile.dep"
$

This is using SVN ToT r28979.

Kind Regards,

Mike

Signed-off-by: Michael McTernan <Michael.McTernan.2001 () cs bris ac uk>
Index: nmap/Makefile.in
===================================================================
--- nmap/Makefile.in    (revision 28979)
+++ nmap/Makefile.in    (working copy)
@@ -186,7 +186,7 @@
clean: @LUA_CLEAN@ @LIBLINEAR_CLEAN@ @PCAP_CLEAN@ @PCRE_CLEAN@ @DNET_CLEAN@ nsock_clean nbase_clean netutil_clean my_clean @NPING_CLEAN@ @ZENMAP_CLEAN@ @NCAT_CLEAN@ @NMAP_UPDATE_CLEAN@

 my_clean:
-       rm -f dependencies.mk makefile.dep
+       rm -f dependencies.mk
        rm -f $(OBJS) $(TARGET) config.cache

 clean-%:
Index: nmap/nmap-update/Makefile.in
===================================================================
--- nmap/nmap-update/Makefile.in        (revision 28979)
+++ nmap/nmap-update/Makefile.in        (working copy)
@@ -46,10 +46,10 @@
        $(RM) -f $(DESTDIR)$(bindir)/nmap-update

 clean:
-       rm -f nmap-update *.o makefile.dep
+       rm -f nmap-update *.o

 distclean: clean
-       rm -f Makefile
+       rm -f Makefile makefile.dep

 Makefile: Makefile.in
        ./config.status
Index: nmap/nping/Makefile.in
===================================================================
--- nmap/nping/Makefile.in      (revision 28979)
+++ nmap/nping/Makefile.in      (working copy)
@@ -112,7 +112,7 @@
 clean: my_clean

 my_clean:
-       rm -f dependencies.mk makefile.dep
+       rm -f dependencies.mk
        rm -f $(OBJS) $(TARGET) config.cache
 debugclean:
        rm -f *.gcov *.gcda *.gcno gmon.out
Index: nmap/libnetutil/Makefile.in
===================================================================
--- nmap/libnetutil/Makefile.in (revision 28979)
+++ nmap/libnetutil/Makefile.in (working copy)
@@ -28,7 +28,7 @@
        rm -f $(OBJS) $(TARGET)

 distclean: clean
-       rm -rf Makefile
+       rm -rf Makefile makefile.dep

 Makefile: Makefile.in
        cd $(top_srcdir) && ./config.status
Index: nmap/nsock/src/Makefile.in
===================================================================
--- nmap/nsock/src/Makefile.in  (revision 28979)
+++ nmap/nsock/src/Makefile.in  (working copy)
@@ -47,10 +47,10 @@
        cd $(NBASEDIR) && $(MAKE)

 clean:
-       rm -f $(OBJS) $(TARGET) makefile.dep
+       rm -f $(OBJS) $(TARGET)

 distclean: clean
-       rm -f Makefile config.log config.status nsock_config.h
+       rm -f Makefile makefile.dep config.log config.status nsock_config.h

 depend:
        $(MAKEDEPEND) $(INCLS) -s "# DO NOT DELETE" -- $(DEFS) -- $(SRCS)
Index: nmap/ncat/Makefile.in
===================================================================
--- nmap/ncat/Makefile.in       (revision 28979)
+++ nmap/ncat/Makefile.in       (working copy)
@@ -156,12 +156,12 @@
        $(RM) -rf $(DESTDIR)$(pkgdatadir)/

 ncat_clean:
-       $(RM) -f *.o test/*.o $(TARGET) $(TEST_PROGS) makefile.dep
+       $(RM) -f *.o test/*.o $(TARGET) $(TEST_PROGS)

 clean: ncat_clean

 distclean: clean
-       -rm -f Makefile $(CONFIG_CLEAN_FILES)
+       -rm -f Makefile makefile.dep $(CONFIG_CLEAN_FILES)

 TESTS = ./test-addrset.sh ./test-cmdline-split ./test-uri
 ifneq ($(HAVE_OPENSSL),)


_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


Current thread: