From 1345e758f55a5d883931eefdcfcb211778c23995 Mon Sep 17 00:00:00 2001 Message-Id: From: "Steffen (Daode) Nurpmeso" Date: Tue, 18 Mar 2014 15:43:12 +0100 Subject: [PATCH 1/2] src/roff/grog/Makefile.sub: fix typos missed in [3b934e4] --- src/roff/grog/Makefile.sub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub index 91153af..b49d535 100644 --- a/src/roff/grog/Makefile.sub +++ b/src/roff/grog/Makefile.sub @@ -70,8 +70,8 @@ uninstall_sub: -for f in $(GROG_); do \ $(RM) "$(DESTDIR)$(grog_dir)/$$f";\ done; - -test -d "$(DESTDIR)$(grog_dir)" ||\ - -$(rmdir) "$(DESTDIR)$(grog_dir)" + -test -d "$(DESTDIR)$(grog_dir)" &&\ + $(rmdir) "$(DESTDIR)$(grog_dir)" ######################################################################## # Emacs settings -- 1.9.0.dirty From ef0bbed95b3290ec47600a579f42b7da39936ff1 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: References: From: "Steffen (Daode) Nurpmeso" Date: Tue, 18 Mar 2014 16:45:14 +0100 Subject: [PATCH 2/2] Tweak '$ make uninstall' to be free of errors --- Makefile.comm | 23 ++++++++++++----------- Makefile.in | 2 +- contrib/chem/Makefile.sub | 4 +--- doc/Makefile.sub | 1 + font/devpdf/Makefile.sub | 16 ++++++++-------- src/roff/groff/Makefile.sub | 5 +++-- src/roff/grog/Makefile.sub | 6 +++--- 7 files changed, 29 insertions(+), 28 deletions(-) diff --git a/Makefile.comm b/Makefile.comm index d6f8df2..7de58bb 100644 --- a/Makefile.comm +++ b/Makefile.comm @@ -292,22 +292,23 @@ install_dev: uninstall_dev: -test -z "$(DEVFILES)$(DEVSCRIPTS)" ||\ for f in ""$(DEVFILES) $(DEVSCRIPTS); do \ - $(RM) $(DESTDIR)$(fontsubdir)/$$f;\ + $(RM) $(DESTDIR)$(fontsubdir)/$${f};\ done -test -z "$(OLDDEVFILES)" ||\ for f in ""$(OLDDEVFILES); do \ - $(RM) $(DESTDIR)$(oldfontsubdir)/$$f;\ + $(RM) $(DESTDIR)$(oldfontsubdir)/$${f};\ done - -test -d $(DESTDIR)$(fontsubdir)/generate &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/generate - -test -d $(DESTDIR)$(fontsubdir)/enc &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/enc - -test -d $(DESTDIR)$(fontsubdir)/map &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/map - -test -d $(DESTDIR)$(fontsubdir)/util &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/util + -d="$(DESTDIR)$(fontsubdir)/generate";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi + -d="$(DESTDIR)$(fontsubdir)/enc";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi + -d="$(DESTDIR)$(fontsubdir)/map";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi + -d="$(DESTDIR)$(fontsubdir)/util";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi -$(rmdir) $(DESTDIR)$(fontsubdir) - -$(rmdir) $(DESTDIR)$(oldfontsubdir) + -d="$(DESTDIR)$(oldfontsubdir)";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi .PHONY: depend_src depend_src: depend.temp diff --git a/Makefile.in b/Makefile.in index 3e733d1..3f14c45 100644 --- a/Makefile.in +++ b/Makefile.in @@ -471,7 +471,7 @@ SH_DEPS_SED_SCRIPT=$(top_builddir)/arch/misc/shdeps.sed RM=rm -f # And we want `rmdir -p' everywhere, too. -rmdir=rmdir -p +rmdir=rmdir # The program to create directory hierarchies. mkinstalldirs= $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/contrib/chem/Makefile.sub b/contrib/chem/Makefile.sub index 6fdd059..fb3c532 100644 --- a/contrib/chem/Makefile.sub +++ b/contrib/chem/Makefile.sub @@ -76,14 +76,13 @@ install_examples: install_always examples $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem -test -d $(DESTDIR)$(exampledir)/chem/122 ||\ $(mkinstalldirs) $(DESTDIR)$(exampledir)/chem/122 - -$(RM) $(DESTDIR)$(exampledir)/chem/* + -find $(DESTDIR)$(exampledir)/chem -type f -exec $(RM) '{}' ';' $(INSTALL_DATA) examples/README \ $(DESTDIR)$(exampledir)/chem/README for i in $(srcdir)/examples/*.chem; do \ n=`echo $$i | sed 's|$(srcdir)/examples/||g'`;\ $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/chem/$$n;\ done - -$(RM) $(DESTDIR)$(exampledir)/chem/122/* $(INSTALL_DATA) examples/122/README \ $(DESTDIR)$(exampledir)/chem/122/README for i in $(srcdir)/examples/122/*.chem; do \ @@ -102,7 +101,6 @@ uninstall_examples: uninstall_always -$(rmdir) $(DESTDIR)$(exampledir)/chem/122 -$(RM) $(DESTDIR)$(exampledir)/chem/* -$(rmdir) $(DESTDIR)$(exampledir)/chem - -$(rmdir) $(DESTDIR)$(exampledir) ######################################################################## # Emacs settings diff --git a/doc/Makefile.sub b/doc/Makefile.sub index f7d9ae8..f3a0c05 100644 --- a/doc/Makefile.sub +++ b/doc/Makefile.sub @@ -266,6 +266,7 @@ uninstall_htmldoc: uninstall_always uninstall_examples: uninstall_always uninstall_examples_always \ $(make_uninstall_htmlexamples) + -$(rmdir) $(DESTDIR)$(exampledir) uninstall_examples_always: -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES); do \ $(RM) $(DESTDIR)$(exampledir)/$$f;\ diff --git a/font/devpdf/Makefile.sub b/font/devpdf/Makefile.sub index cbdeb78..3ab2dfc 100644 --- a/font/devpdf/Makefile.sub +++ b/font/devpdf/Makefile.sub @@ -119,11 +119,11 @@ uninstall_sub: -for f in $(MOSTLYCLEANADD); do \ $(RM) $(DESTDIR)$(fontsubdir)/$$f;\ done - -test -d $(DESTDIR)$(fontsubdir)/enc &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/enc - -test -d $(DESTDIR)$(fontsubdir)/map &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/map - -test -d $(DESTDIR)$(fontsubdir)/util &&\ - $(rmdir) $(DESTDIR)$(fontsubdir)/util - -test -d $(DESTDIR)$(fontsubdir) &&\ - $(rmdir) $(DESTDIR)$(fontsubdir) + -d="$(DESTDIR)$(fontsubdir)/enc";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi + -d="$(DESTDIR)$(fontsubdir)/map";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi + -d="$(DESTDIR)$(fontsubdir)/util";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi + -d="$(DESTDIR)$(fontsubdir)";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi diff --git a/src/roff/groff/Makefile.sub b/src/roff/groff/Makefile.sub index 9ce1939..954cf93 100644 --- a/src/roff/groff/Makefile.sub +++ b/src/roff/groff/Makefile.sub @@ -72,8 +72,9 @@ uninstall_sub: $(RM) $(DESTDIR)$(libprogramdir)/$$f;\ done # XXX This will be removed by `uninstall_dirs' in `$(top_srcdir)/Makefile.in' -# -test -d $(DESTDIR)$(libprogramdir) &&\ -# $(rmdir) $(DESTDIR)$(libprogramdir) +# XXX (And only from there it is successful on an empty directory) +# -d="$(DESTDIR)$(libprogramdir)";\ +# if test -d "$${d}"; then $(rmdir) "$${d}"; fi ######################################################################## # Emacs settings diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub index b49d535..6c174a9 100644 --- a/src/roff/grog/Makefile.sub +++ b/src/roff/grog/Makefile.sub @@ -69,9 +69,9 @@ uninstall_sub: -$(RM) "$(DESTDIR)$(bindir)/grog"; -for f in $(GROG_); do \ $(RM) "$(DESTDIR)$(grog_dir)/$$f";\ - done; - -test -d "$(DESTDIR)$(grog_dir)" &&\ - $(rmdir) "$(DESTDIR)$(grog_dir)" + done + -d="$(DESTDIR)$(grog_dir)";\ + if test -d "$${d}"; then $(rmdir) "$${d}"; fi ######################################################################## # Emacs settings -- 1.9.0.dirty