[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/02: - If there is a system tmac macro package, groff version
From: |
Bertrand Garrigues |
Subject: |
[groff] 02/02: - If there is a system tmac macro package, groff version of the package should be installed with a prefix. |
Date: |
Mon, 15 Sep 2014 22:36:00 +0000 |
bgarrigues pushed a commit to branch automake2
in repository groff.
commit 87596dd1bb3322c03473692adeaf2cac178f8853
Author: Bertrand Garrigues <address@hidden>
Date: Tue Sep 16 00:28:04 2014 +0200
- If there is a system tmac macro package, groff version of the
package should be installed with a prefix.
- test-groff should be cleaned
---
Makefile.am | 3 ++-
TESTS | 21 ++++++++++++++-------
tmac/tmac.am | 46 ++++++++++++++++++++++++++++++++++------------
3 files changed, 50 insertions(+), 20 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 2c131f4..275eec6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -808,7 +808,8 @@ EXTRA_DIST += \
MOSTLYCLEANFILES += $(prefixexecbin_SCRIPTS) $(bin_SCRIPTS) \
$(man1_MANS) $(man5_MANS) $(man7_MANS) \
- $(PREFIXMAN1) $(PREFIXMAN5) $(PREFIXMAN7)
+ $(PREFIXMAN1) $(PREFIXMAN5) $(PREFIXMAN7) \
+ test-groff
# Rule to build .man files. The brackets around the @ are used to prevent the
# substitution of the variable by automake.
diff --git a/TESTS b/TESTS
index c0f7317..c0a2852 100644
--- a/TESTS
+++ b/TESTS
@@ -397,13 +397,7 @@ Differences with former build system:
Diff with previous build system:
- devcp1047 fonts are installed $(DESTDIR)/usr/local/groff/1.22.2/font
-TODO:
-
- - The original build system might uses tmac_s_prefix,
- tmac_an_prefix, tmac_wrap and sys_tmac_prefix during the
- installation of some tmac files but set these variables to an empty
- value in tmac/Makefile.sub, I don't quite understand how these
- variables could be set.
+TODO:
- When contrib and doc will be completed, full installation tree
comparison with the tree installed by the old build system. Note:
@@ -582,6 +576,19 @@ always installed, no matter which option is passed, which
is a bug.
install/uninstall, distcheck) work as usual. No diff with the old
build system.
+3.4 Build in presence of system tmac files
+
+ - Create 3 dummy files in /usr/lib/tmac: tmac.an, tmac.m, tmac.s, that all
contain:
+
+.if
+
+ - Build and install as usual:
+
+ -- $(DESTDIR)/usr/local/lib/groff/site-tmac/ contains 3 files: an.tmac,
m.tmac, s.tmac
+ -- In $(DESTDIR)/usr/local/share/groff/1.22.2/tmac 6 files have a
+ 'g' prefix: gan.tmac, gm.tmac, gmm.tmac, gmmse.tmac, gmse.tmac,
+ gs.tmac.
+
Notes
-----
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 80bdba4..660d96b 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -20,6 +20,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
tmac_srcdir = $(top_srcdir)/tmac
+tmac_builddir = $(top_builddir)/tmac
man7_MANS += \
tmac/groff_ms.n \
@@ -117,16 +118,6 @@ MOSTLYCLEANFILES += $(TMACMDOCFILES) tmac/www.tmac
$(TMACSTRIPFILES) \
tmac/stamp-wrap \
tmac/*-wrap
-# FIXME
-# Original Makefile.sub forced the following variables that are
-# originally defined in the top Makefile.am. We don't use them here,
-# if they are needed custom install commands should be written
-#
-# tmac_s_prefix=
-# tmac_an_prefix=
-# tmac_wrap=
-# sys_tmac_prefix=
-
EXTRA_DIST += \
tmac/fixmacros.sed \
tmac/groff_ms.man \
@@ -152,6 +143,12 @@ tmac-dist-hook:
cp -f $(top_srcdir)/$$f-u $(distdir)/tmac; \
done
+
+# If an existing system tmac macro is installed (/usr/lib/tmac
+# contains tmac.anm tmac.m, tmac.s), ms and man macros are installed
+# as gs.tmac and gan.tmac, instead of s.tmac and an.tmac. Alos,
+# an.tmac, m.tmac and s.tmac files are installed in
+# <prefix>/lib/groff/site-tmac.
all: tmac/stamp-wrap
$(TMACMDOCFILES) $(TMACSTRIPFILES):
@@ -166,7 +163,7 @@ tmac/stamp-wrap:
for m in ""$(tmac_wrap); do \
rm -f $(top_builddir)/tmac/$$m-wrap; \
if test "$$m" = an; then \
- echo .do mso $(tmac_srcdir)/andoc.tmac
>>$(top_builddir)/tmac/$$m-wrap; \
+ echo .do mso andoc.tmac >>$(top_builddir)/tmac/$$m-wrap; \
fi; \
echo .cp 1 >>$(top_builddir)/tmac/$$m-wrap; \
echo .so $(sys_tmac_prefix)$$m >>$(top_builddir)/tmac/$$m-wrap; \
@@ -179,12 +176,37 @@ tmac/www.tmac: tmac/www.tmac.in
sed -e "s;address@hidden@];$(pnmtops_nosetpage);g" \
$(tmac_srcdir)/www.tmac.in > $(top_builddir)/tmac/www.tmac
+install-data-local: install_tmac_wrap
+install_tmac_wrap:
+ $(MKDIR_P) $(DESTDIR)$(systemtmacdir);
+ if test -n "$(tmac_wrap)"; then \
+ for m in ""$(tmac_wrap); do \
+ $(INSTALL_DATA) $(tmac_builddir)/$$m-wrap \
+ $(DESTDIR)$(systemtmacdir)/$$m.tmac; \
+ done; \
+ fi
+
+install-data-hook: install_tmac_wrap_hook
+install_tmac_wrap_hook:
+ if test -n "$(tmac_wrap)"; then \
+ if test -f $(DESTDIR)$(tmacdir)/s.tmac; then \
+ mv $(DESTDIR)$(tmacdir)/s.tmac \
+ $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac; \
+ fi; \
+ if test -f $(DESTDIR)$(tmacdir)/an.tmac; then \
+ mv $(DESTDIR)$(tmacdir)/an.tmac \
+ $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac; \
+ fi; \
+ fi
+
uninstall_groffdirs: uninstall_tmac_hook
uninstall_tmac_hook:
- -if test -n "$(tmac_wrap)"; then \
+ if test -n "$(tmac_wrap)"; then \
for m in ""$(tmac_wrap); do \
rm -f $(DESTDIR)$(systemtmacdir)/$$m.tmac; \
done; \
+ $(RM) -f $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac; \
+ $(RM) -f $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac; \
fi
if test -d $(DESTDIR)$(mdocdir); then \
rmdir $(DESTDIR)$(mdocdir); \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/02: - If there is a system tmac macro package, groff version of the package should be installed with a prefix.,
Bertrand Garrigues <=