[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 12/46: - src/devices: add install/uninstall extra rules for xdit
From: |
Bertrand Garrigues |
Subject: |
[groff] 12/46: - src/devices: add install/uninstall extra rules for xditview - fix uninstall (failed if done on an empty tree) |
Date: |
Sun, 05 Oct 2014 22:30:53 +0000 |
bgarrigues pushed a commit to branch automake3
in repository groff.
commit 3959f1f9237e065868c089552019d8a0a4ed93f6
Author: Bertrand Garrigues <address@hidden>
Date: Sun Aug 24 01:28:41 2014 +0200
- src/devices: add install/uninstall extra rules for xditview
- fix uninstall (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 d327de7..25aab3e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -567,8 +567,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 b5e77dc..c0079d4 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/X11/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
@@ -223,9 +225,13 @@ TODO: src/devices specific rules
- $(DESTDIR)/usr/local/lib/charset.alias if exists
- $(DESTDIR)/usr/local/bin/*
- $(DESTDIR)/usr/local/man/man1/*
+ - $(DESTDIR)/usr/local/man/man5/*
- $(DESTDIR)/usr/local/share/groff/1.22/eign
- $(DESTDIR)/usr/local/share/groff/1.22/
- $(DESTDIR)/usr/local/share/groff/
+ - $(DESTDIR)/usr/X11/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: - src/devices: add install/uninstall extra rules for xditview - fix uninstall (failed if done on an empty tree),
Bertrand Garrigues <=