>From c626e5fc76785897a6c9c9e9863838244e091e4b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 20 Jun 2019 11:18:14 -0700 Subject: [PATCH] Fix extraclean in a different way for info+lib/sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Makefile.in (extraclean): * lib/Makefile.in (extraclean): Use rmdir but suppress any error indication. That way, ‘make extraclean’ will remove the directory if it’s empty, and successfully do nothing otherwise. --- Makefile.in | 1 + lib/Makefile.in | 1 + 2 files changed, 2 insertions(+) diff --git a/Makefile.in b/Makefile.in index c829ca29bd..aa11e6b0b7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -942,6 +942,7 @@ extraclean: $(extraclean_dirs: -rm -f config-tmp-* aclocal.m4 configure -rm -f ./*~ \#* etc/refcards/emacsver.tex doc/emacs/emacsver.texi -rm -f info/*.info info/dir + -rmdir info 2>/dev/null # The src subdir knows how to do the right thing # even when the build directory and source dir are different. diff --git a/lib/Makefile.in b/lib/Makefile.in index bf9b01f143..1973452b22 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -127,6 +127,7 @@ distclean bootstrap-clean: maintainer-clean: distclean rm -f TAGS gnulib.mk extraclean: distclean + -rmdir sys 2>/dev/null .PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean -- 2.21.0