[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 12/46: Fix `install' and `uninstall' targets
From: |
Bertrand Garrigues |
Subject: |
[groff] 12/46: Fix `install' and `uninstall' targets |
Date: |
Sat, 29 Nov 2014 19:47:28 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit 8f4cb4561c2db76ef10c50a2195d68bf04ecdd01
Author: Bertrand Garrigues <address@hidden>
Date: Sun Aug 24 01:28:41 2014 +0200
Fix `install' and `uninstall' targets
* src/devices/xditview/xditview.am: add install and uninstall custom
rules.
* Makefile.am: fix uninstall (previously failed if done on an empty
tree).
---
Makefile.am | 8 ++++++--
TESTS | 12 +++++++++---
src/devices/xditview/xditview.am | 27 ++++++++++++++++++++++++++-
3 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index c59a34c..9e3785c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -573,8 +573,12 @@ lib/localcharset.$(OBJEXT): lib/configmake.h
# directories specific to groff
uninstall-hook: uninstall_groffdirs
uninstall_groffdirs:
- rmdir $(DESTDIR)$(datasubdir)
- rmdir $(DESTDIR)$(dataprogramdir)
+ if test -d $(DESTDIR)$(datasubdir); then \
+ rmdir $(DESTDIR)$(datasubdir); \
+ fi
+ if test -d $(DESTDIR)$(dataprogramdir); then \
+ rmdir $(DESTDIR)$(dataprogramdir); \
+ fi
# Other files that should be present in the distribution tarball.
EXTRA_DIST += \
diff --git a/TESTS b/TESTS
index 1baebc9..bb800d5 100644
--- a/TESTS
+++ b/TESTS
@@ -202,8 +202,6 @@ Differences with former build system:
2.6 make install
-TODO: src/devices specific rules
-
mkdir -p ~/tmp/automake
make install DESTDIR=~/tmp/automake
@@ -211,8 +209,12 @@ TODO: src/devices specific rules
$(DESTDIR)/usr/local/lib, make install update it by adding 'groff'
to the list of programs using it. Otherwise nothing is installed.
- programs from src/utils are installed in $(DESTDIR)/usr/local/bin
- - man files from src/utils are installed in
$(DESTDIR)/usr/local/share/man/man1
+ - man files from src/utils, src/devices are installed in
+ $(DESTDIR)/usr/local/share/man/man1 or man5
- $(DESTDIR)/usr/local/share/groff/1.22/eign (from src/utils/indxbib)
+ - In $(DESTDIR)/usr/local/lib/X11/app-defaults: GXditview and
+ GXditview-color. If these files are already present, they are
+ first moved to GXditview.old and GXditview-color.old.
2.7 make uninstall
@@ -225,7 +227,11 @@ TODO: src/devices specific rules
- $(DESTDIR)/usr/local/man/man1/*
- $(DESTDIR)/usr/local/share/groff/1.22.3/eign
- $(DESTDIR)/usr/local/share/groff/1.22.3/
+ - $(DESTDIR)/usr/local/man/man5/*
- $(DESTDIR)/usr/local/share/groff/
+ - $(DESTDIR)/usr/local/lib/X11/app-defaults/GXditview and
+ GXditview-color. However, GXditview.old and GXditview-color.old
+ are not removed (this is the behaviour on the old build system)
2.8 make dist
diff --git a/src/devices/xditview/xditview.am b/src/devices/xditview/xditview.am
index 2f00206..75dda1d 100644
--- a/src/devices/xditview/xditview.am
+++ b/src/devices/xditview/xditview.am
@@ -71,4 +71,29 @@ EXTRA_DIST += \
src/devices/xditview/gray8.bm \
src/devices/xditview/xdit.bm \
src/devices/xditview/xdit_mask.bm \
- src/devices/xditview/gxditview.man
\ No newline at end of file
+ src/devices/xditview/gxditview.man
+
+# Custom installation of GXditview.ad and GXditview-color.ad
+install-data-local: install_xditview
+uninstall-local: uninstall_xditview
+
+install_xditview: $(xditview_srcdir)/GXditview.ad
$(xditview_srcdir)/GXditview-color.ad
+ -test -d $(DESTDIR)$(appresdir) \
+ || $(mkinstalldirs) $(DESTDIR)$(appresdir)
+ if test -f $(DESTDIR)$(appresdir)/GXditview; then \
+ mv $(DESTDIR)$(appresdir)/GXditview \
+ $(DESTDIR)$(appresdir)/GXditview.old; \
+ fi
+ if test -f $(DESTDIR)$(appresdir)/GXditview-color; then \
+ mv $(DESTDIR)$(appresdir)/GXditview-color \
+ $(DESTDIR)$(appresdir)/GXditview-color.old; \
+ fi
+ $(INSTALL_DATA) $(xditview_srcdir)/GXditview.ad \
+ $(DESTDIR)$(appresdir)/GXditview
+ $(INSTALL_DATA) $(xditview_srcdir)/GXditview-color.ad \
+ $(DESTDIR)$(appresdir)/GXditview-color
+
+uninstall_xditview:
+ rm -f $(DESTDIR)$(appresdir)/GXditview
+ rm -f $(DESTDIR)$(appresdir)/GXditview-color
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 12/46: Fix `install' and `uninstall' targets,
Bertrand Garrigues <=