I wrote..
|find below something that adds the mentioned options and also
|tweaks the make system a bit -- 'make install' and 'make
|uninstall' seem to work again after the patch series is applied.
|There are still problems ('make install' with DESTDIR set results
|in some errors along the way, mostly contrib/hdtbl, 'make
|uninstall' still leaves some stale directories laying around)
[.]
For simplicity (i.e., passing by the GNU copyright scan :) i'll
attach the necessary add-on patch to make install and uninstall
completely error free, and without no stale directories laying
around.
The mentioned `contrib/hdtbl' problem is on the Apple Snow Leopard
side, however:
i am here 0: "/Volumes/UDF/arena/code.extern/groff.git/font/devps"
i am here 1: "all" *f is ""
i am here 1.5
i am here 2
i am here 3
i am here 4:, 22
i am here 4.5
examples/fonts_n.roff:153: Font not found.
^^
This because '.if !F \\*[*$1] \{\' -> '!F "\.."'
elapsed time: 0 seconds
***
...
examples/fonts_x.roff:153: name expected (got `\{')
listing font `'...
examples/fonts_x.roff:153: warning: can't find font `='
elapsed time: 0 seconds
***
That is, tr(1) is buggy, and the command
(from `hdtbl/examples/fonts_[nx].in')
. pso sh -c \
"echo -n .ds *f\ ; \
ls \\*[fontpath]/dev\*[.T] \
| tr '[:cntrl:]' ' '"
. \" This dummy line is necessary; the preceding line eats it.
doesn't work; if i do
0[steffen@sherwood groff.git]$ (cd font/devps/; ls| /usr/bin/tr '[:cntrl:]' '
')
then i get
r.pfa zapfdr.ps ?0[steffen@sherwood groff.git]$
however if i append `;echo' to the above it's fine. This doesn't
work in the code above, yet i decided not to look further since
this is Snow Leopard from i think 2009 and noone but me seems to
have complained about that? It's fine on the tested Linux and
BSD systems anyway.
--steffen
From 1345e758f55a5d883931eefdcfcb211778c23995 Mon Sep 17 00:00:00 2001
Message-Id: <1345e758f55a5d883931eefdcfcb211778c23995.1395161189.git.sdao...@users.sf.net>
From: "Steffen (Daode) Nurpmeso" <[email protected]>
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: <ef0bbed95b3290ec47600a579f42b7da39936ff1.1395161189.git.sdao...@users.sf.net>
In-Reply-To: <1345e758f55a5d883931eefdcfcb211778c23995.1395161189.git.sdao...@users.sf.net>
References: <1345e758f55a5d883931eefdcfcb211778c23995.1395161189.git.sdao...@users.sf.net>
From: "Steffen (Daode) Nurpmeso" <[email protected]>
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