Jim Meyering wrote:
> And here's one more, so I don't forget:
>
> rm -rf src/.deps
> rm -f Makefile
> ERROR: files left in build directory after distclean:
> ./man/arch.1
> ./man/hostname.1
> make[1]: *** [distcleancheck] Error 1
> make[1]: Leaving directory
> `/h/j/w/co/cu/coreutils-8.19.68-ea804-dirty/_build'
> make: *** [distcheck] Error 1
Ahh... that looked familiar once I got into it.
I fixed a similar problem when converting cppi:
diff --git a/man/local.mk b/man/local.mk
index 80519af..a52f5af 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -186,3 +186,8 @@ $(MAN): $(top_srcdir)/src/system.h
&& rm -rf $$t \
&& chmod -w $@-t \
&& mv $@-t $@
+
+# This is a kludge to remove man/*.1 from a non-srcdir build.
+distclean-local:
+ test 'x$(srcdir)' = 'x$(builddir)' \
+ || rm -f $(dist_man1_MANS) $(extra_man_1)