]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Some Makefile improvements.
authorWayne Davison <wayne@opencoder.net>
Wed, 29 Jul 2020 18:51:55 +0000 (11:51 -0700)
committerWayne Davison <wayne@opencoder.net>
Wed, 29 Jul 2020 18:51:55 +0000 (11:51 -0700)
- Improve distclean.
- Remove proto.h from GENFILES (we don't need to distribute it).
- Improve finddead target.

Makefile.in
packaging/auto-Makefile

index 1c0401722d0d713ddd3d765c946310c8ed575ae7..1c53af6acbd14e04577476c1198506ede2f68d73 100644 (file)
@@ -32,7 +32,7 @@ SHELL=/bin/sh
 SIMD_x86_64=simd-checksum-x86_64.o
 ASM_x86_64=lib/md5-asm-x86_64.o
 
-GENFILES=configure.sh aclocal.m4 config.h.in proto.h proto.h-tstamp rsync.1 rsync.1.html \
+GENFILES=configure.sh aclocal.m4 config.h.in rsync.1 rsync.1.html \
         rsync-ssl.1 rsync-ssl.1.html rsyncd.conf.5 rsyncd.conf.5.html
 HEADERS=byteorder.h config.h errcode.h proto.h rsync.h ifuncs.h itypes.h inums.h \
        lib/pool_alloc.h lib/mdigest.h lib/md-defines.h version.h
@@ -250,7 +250,7 @@ rsyncd.conf.5: rsyncd.conf.5.md md2man version.h Makefile
 clean: cleantests
        rm -f *~ $(OBJS) $(CHECK_PROGS) $(CHECK_OBJS) $(CHECK_SYMLINKS) \
                rounding rounding.h *.old rsync*.1 rsync*.5 rsync*.html \
-               daemon-parm.h help-*.h default-*.h
+               daemon-parm.h help-*.h default-*.h proto.h proto.h-tstamp
 
 .PHONY: cleantests
 cleantests:
@@ -261,16 +261,11 @@ cleantests:
 # the source directory.
 .PHONY: distclean
 distclean: clean
-       rm -f Makefile config.h config.status
-       rm -f stunnel-rsyncd.conf
-       rm -f lib/dummy popt/dummy zlib/dummy
-       rm -f $(srcdir)/Makefile $(srcdir)/config.h $(srcdir)/config.status
-       rm -f $(srcdir)/lib/dummy $(srcdir)/popt/dummy $(srcdir)/zlib/dummy
-       rm -f config.cache config.log
-       rm -f $(srcdir)/config.cache $(srcdir)/config.log
-       rm -f shconfig $(srcdir)/shconfig
-       rm -f $(GENFILES)
-       rm -rf autom4te.cache
+       for dir in $(srcdir) . ; do \
+           (cd "$$dir" && rm -rf Makefile config.h config.status stunnel-rsyncd.conf \
+            lib/dummy popt/dummy zlib/dummy config.cache config.log shconfig \
+            $(GENFILES) autom4te.cache) ; \
+       done
 
 # this target is really just for my use. It only works on a limited
 # range of machines and is used to produce a list of potentially
@@ -280,6 +275,7 @@ finddead:
        nm *.o */*.o |grep 'U ' | awk '{print $$2}' | sort -u > nmused.txt
        nm *.o */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
        comm -13 nmused.txt nmfns.txt
+       @rm nmused.txt nmfns.txt
 
 # 'check' is the GNU name, 'test' is the name for everybody else :-)
 .PHONY: test
index e50277cb09dc7e30d3e3f727ed7db84eca3bfdc8..29d2d6889370861b6753d01d76609a37f3f4d6af 100644 (file)
@@ -1,6 +1,6 @@
 TARGETS := all install install-ssl-daemon install-all install-strip conf gen gensend reconfigure restatus \
        proto man clean cleantests distclean test check check29 check30 installcheck splint \
-       doxygen doxygen-upload
+       doxygen doxygen-upload finddead
 
 .PHONY: $(TARGETS) auto-prep