From 81a1a53a367f550f6804c7fc562498534ce10d51 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Wed, 8 Oct 2014 16:51:33 -0400 Subject: [PATCH] Clean up our cleaning 'make clean' and 'make maintainer-clean' still leave around a fair number of droppings, prior to this commit. We were not descending into the 'tests' top-level directory while cleaning. Furthermore, tests/opr/Makefile needed $(LT_CLEAN), and tests/rx/Makefile needed to spell it correctly. The libtoolization places a lot of files to be removed in the 'pristine' target. The processing used to implement the =include directive in the pod sources for the man pages leaves around the non-.in versions of files; we should clean that up in the 'pristine' target as well. The 'pristine' target should likewise remove the man pages which are generated from the pod files. Additionally, the documentation build uses a Doxyfile which is output by configure; that should be removed (if present) by the 'distclean' target. When hcrypto was converted to libtool, the use of ${OBJECTS} in the clean target was missed, so we were leaving around most of the actual object files -- $(LT_CLEAN) does not handle this for us. Change the rule to remove *.o as is done elsewhere. The conversion of libafsrpc to libtool added a convenience library libafsrpc_sys.la, and changed how syscall.o was generated on most architectures, to be the result of compiling an empty .c file (instead of just an empty .o file). This introduced a new intermediate file, syscall.c, which must be cleaned up. tvolser was only listing volserver and not vos in its list of executables to remove while cleaning. The conversion of venus/test to libtool was not done quite right. Makefile.libtool and the .lo suffix are only needed when libtool is being used to link *libraries*; just Makefile.pthread suffices when libtool is being used to link executables. As such, remove the inclusion of Makefile.libtool, and change the .lo targets back to regular .o ones, and add back *.o to the list of files to remove in the 'clean' target (it was needed there even without the other changes to that Makefile). Change-Id: Ifbc3eee4ad2dce54df991301bc5edd11eb29a24a Reviewed-on: http://gerrit.openafs.org/11532 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman --- Makefile.in | 28 ++++++++++++++++++++++++++-- src/crypto/hcrypto/Makefile.in | 5 ++--- src/sys/Makefile.in | 2 +- src/tvolser/Makefile.in | 2 +- src/venus/test/Makefile.in | 19 +++++++++---------- tests/opr/Makefile.in | 1 + tests/rx/Makefile.in | 2 +- 7 files changed, 41 insertions(+), 18 deletions(-) diff --git a/Makefile.in b/Makefile.in index 455c04a31a..082c63c8e9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -780,6 +780,7 @@ clean2: -(cd src; /bin/rm cscope.out) -(cd src/libafs; /bin/rm -rf afs afsint config rx) -(cd src/libuafs; /bin/rm -rf afs afsint config rx) + -(cd tests ${COMPILE_CLEAN}) -/bin/rm -rf ${TOP_INCDIR} ${TOP_LIBDIR} ${TOP_JLIBDIR} -/bin/rm -rf libafs_tree ${SYS_NAME} @@ -948,10 +949,33 @@ distclean: clean tests/volser/Makefile \ src/helper-splint.sh if test -d doc/man-pages ; then \ - rm -f doc/man-pages/Makefile doc/man-pages/install-man ; \ + /bin/rm -f doc/man-pages/Makefile doc/man-pages/install-man ; \ + fi + if test -d doc/doxygen ; then \ + /bin/rm -f doc/doxygen/Doxyfile ; \ fi pristine: distclean - /bin/rm -f src/config/afsconfig.h.in configure configure-libafs aclocal.m4 + /bin/rm -f src/config/afsconfig.h.in configure configure-libafs \ + aclocal.m4 \ + libtool \ + build-tools/ltmain.sh \ + src/cf/libtool.m4 \ + src/cf/ltoptions.m4 \ + src/cf/ltsugar.m4 \ + src/cf/ltversion.m4 \ + src/cf/lt~obsolete.m4 + if test -d doc/xml ; then \ + /bin/rm -f doc/xml/mobi-fixup.xsl ; \ + fi + if test -d doc/man-pages ; then \ + /bin/rm -rf doc/man-pages/man1 \ + doc/man-pages/man3 \ + doc/man-pages/man5 \ + doc/man-pages/man8 ; \ + fi + for i in doc/man-pages/pod*/*.pod.in; do \ + /bin/rm -f $${i%.in}; \ + done maintainer-clean: pristine diff --git a/src/crypto/hcrypto/Makefile.in b/src/crypto/hcrypto/Makefile.in index 0d260d1998..16abc10b7a 100644 --- a/src/crypto/hcrypto/Makefile.in +++ b/src/crypto/hcrypto/Makefile.in @@ -66,9 +66,8 @@ dest: libafshcrypto.la libafshcrypto.a clean: $(LT_CLEAN) - $(RM) -f ${OBJECTS} rand-fortuna_lwp.o \ - libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \ - test_cipher test_cipher.o + $(RM) -f *.o libafshcrypto.a libafshcrypto_lwp.a libafshcrypto.exp \ + test_cipher $(LT_objs): $(HEADERS) diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index c3c57f15f3..b773205c01 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -269,5 +269,5 @@ clean: $(LT_CLEAN) $(RM) -f *.o libsys.a xfsinode iinc idec icreate iopen istat core \ rmtsysc rmtsyss *.o rmtsys.ss.c rmtsys.cs.c rmtsys.xdr.c rmtsys.h \ - rmtsysd AFS_component_version_number.c \ + rmtsysd AFS_component_version_number.c syscall.c \ afs.exp afsl.exp libafssetpag.* Krmtsys.cs.c Krmtsys.h Krmtsys.xdr.c diff --git a/src/tvolser/Makefile.in b/src/tvolser/Makefile.in index 046d81a8c2..88812b2ac4 100644 --- a/src/tvolser/Makefile.in +++ b/src/tvolser/Makefile.in @@ -194,7 +194,7 @@ dest: volserver clean: $(LT_CLEAN) - $(RM) -f *.o volserver core AFS_component_version_number.c \ + $(RM) -f *.o vos volserver core AFS_component_version_number.c \ vl_errors.c vlserver.h include ../config/Makefile.version diff --git a/src/venus/test/Makefile.in b/src/venus/test/Makefile.in index a6e56bd447..667df2afe3 100644 --- a/src/venus/test/Makefile.in +++ b/src/venus/test/Makefile.in @@ -7,7 +7,6 @@ srcdir=@srcdir@ include @TOP_OBJDIR@/src/config/Makefile.config -include @TOP_OBJDIR@/src/config/Makefile.libtool include @TOP_OBJDIR@/src/config/Makefile.pthread top_builddir=@top_builddir@ @@ -30,16 +29,16 @@ all test: fulltest owntest idtest getinitparams install: dest: -fulltest: fulltest.lo - $(LT_LDRULE_static) $@.lo $(LT_deps) $(LT_libs) -owntest: owntest.lo - $(LT_LDRULE_static) $@.lo $(LT_deps) $(LT_libs) -idtest: idtest.lo - $(LT_LDRULE_static) $@.lo $(LT_deps) $(LT_libs) -getinitparams: getinitparams.lo - $(LT_LDRULE_static) $@.lo $(LT_deps) $(LT_libs) +fulltest: fulltest.o + $(LT_LDRULE_static) $@.o $(LT_deps) $(LT_libs) +owntest: owntest.o + $(LT_LDRULE_static) $@.o $(LT_deps) $(LT_libs) +idtest: idtest.o + $(LT_LDRULE_static) $@.o $(LT_deps) $(LT_libs) +getinitparams: getinitparams.o + $(LT_LDRULE_static) $@.o $(LT_deps) $(LT_libs) clean: $(LT_CLEAN) - $(RM) -f fulltest owntest idtest getinitparams + $(RM) -f *.o fulltest owntest idtest getinitparams diff --git a/tests/opr/Makefile.in b/tests/opr/Makefile.in index 5e7057cd2e..7625eb43a4 100644 --- a/tests/opr/Makefile.in +++ b/tests/opr/Makefile.in @@ -33,4 +33,5 @@ uuid-t: uuid-t.o $(LT_LDRULE_static) uuid-t.o ../tap/libtap.a $(LIBS) $(XLIBS) clean distclean: + $(LT_CLEAN) $(RM) -f $(tests) *.o core diff --git a/tests/rx/Makefile.in b/tests/rx/Makefile.in index f629d1bf7f..f5b4cf9244 100644 --- a/tests/rx/Makefile.in +++ b/tests/rx/Makefile.in @@ -19,5 +19,5 @@ event-t: event-t.o $(LIBS) install: clean distclean: - $(LT_clean) + $(LT_CLEAN) $(RM) -f $(tests) *.o core