From 309340d542c41eb578d6bb8ae7ea09142a4f88fa Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 20 Aug 2016 20:08:05 -0700 Subject: [PATCH] maint: fix distclean-vs-excess-.Po files more cleanly * doc/local.mk (distclean-local): Remove rule. Moved to ... * Makefile.am (distclean-local): ...here, and add a command to remove all .deps directories. It could have stayed in that .mk file, but since with this change, it is no longer specific to doc/, the top level makes more sense. * lib/local.mk (MOSTLYCLEANFILES): Remove this. Covered by the above. Reported by Assaf Gordon in https://lists.gnu.org/archive/html/sed-devel/2016-08/msg00019.html --- Makefile.am | 9 +++++++++ doc/local.mk | 4 ++++ lib/local.mk | 5 ----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8fd5656..de2ef30 100644 --- a/Makefile.am +++ b/Makefile.am @@ -131,3 +131,12 @@ include $(top_srcdir)/lib/local.mk include $(top_srcdir)/sed/local.mk include $(top_srcdir)/doc/local.mk include $(top_srcdir)/testsuite/local.mk + +# Remove the generated sed.1 file, but only for a non-srcdir build. +# Without this, 'make distcheck's final comparison would fail. +# Also remove lib/.deps/{getfilecon,obstack}.Po, +# which are left behind by bleeding edge automake. +# Without this, 'make distcheck's final comparison would fail. +distclean-local: + test x$(srcdir) = x$(builddir) || rm -f $(dist_man_MANS) + find . -name .deps -type d | xargs rm -rf diff --git a/doc/local.mk b/doc/local.mk index a6ba84e..9a3893c 100644 --- a/doc/local.mk +++ b/doc/local.mk @@ -50,5 +50,9 @@ doc/sed.1: sed/sed .version $(srcdir)/doc/sed.x # Remove the generated sed.1 file, but only for a non-srcdir build. # Without this, 'make distcheck's final comparison would fail. +# Also remove lib/.deps/{getfilecon,obstack}.Po, +# which are left behind by bleeding edge automake. +# Without this, 'make distcheck's final comparison would fail. distclean-local: test x$(srcdir) = x$(builddir) || rm -f $(dist_man_MANS) + find . -name .deps -type d | xargs rm -rf diff --git a/lib/local.mk b/lib/local.mk index 102d309..9166e63 100644 --- a/lib/local.mk +++ b/lib/local.mk @@ -22,8 +22,3 @@ lib_libsed_a_CFLAGS = $(AM_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS) lib_libsed_a_LIBADD += $(LIBOBJS) $(ALLOCA) lib_libsed_a_DEPENDENCIES += $(LIBOBJS) $(ALLOCA) - -# This is a kludge to remove lib/.deps/{getfilecon,obstack}.Po, -# which are left behind by bleeding edge automake. -# Without this, 'make distcheck's final comparison would fail. -MOSTLYCLEANFILES += lib/.deps/*.Po -- 2.7.4