# Copyright (C) 1989-2018 Free Software Foundation, Inc.
# Written by James Clark (jjc@jclark.com)
# Automake migration by Bertrand Garrigues
#
# Latest update: 22 Aug 2015
#
# This file is part of groff.
#
# groff is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# groff is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
tmac_srcdir = $(top_srcdir)/tmac
tmac_builddir = $(top_builddir)/tmac
man7_MANS += \
tmac/groff_ms.7 \
tmac/groff_man.7 \
tmac/groff_me.7 \
tmac/groff_mdoc.7 \
tmac/groff_trace.7 \
tmac/groff_www.7
TMACNORMALFILES = \
tmac/man.tmac \
tmac/mandoc.tmac \
tmac/andoc.tmac \
tmac/an-old.tmac \
tmac/an-ext.tmac \
tmac/ms.tmac \
tmac/me.tmac \
tmac/mdoc.tmac \
tmac/pic.tmac \
tmac/a4.tmac \
tmac/papersize.tmac \
tmac/62bit.tmac \
tmac/ec.tmac \
tmac/safer.tmac \
tmac/trace.tmac \
tmac/ps.tmac \
tmac/psold.tmac \
tmac/pdfpic.tmac \
tmac/pspic.tmac \
tmac/psatk.tmac \
tmac/pdf.tmac \
tmac/dvi.tmac \
tmac/tty.tmac \
tmac/tty-char.tmac \
tmac/latin1.tmac \
tmac/latin2.tmac \
tmac/latin5.tmac \
tmac/latin9.tmac \
tmac/cp1047.tmac \
tmac/unicode.tmac \
tmac/X.tmac \
tmac/Xps.tmac \
tmac/lj4.tmac \
tmac/lbp.tmac \
tmac/html.tmac \
tmac/html-end.tmac \
tmac/devtag.tmac \
tmac/europs.tmac \
tmac/composite.tmac \
tmac/fallbacks.tmac \
tmac/eqnrc \
tmac/refer.tmac \
tmac/refer-me.tmac \
tmac/refer-ms.tmac \
tmac/troffrc \
tmac/troffrc-end \
tmac/trans.tmac \
tmac/hyphen.us \
tmac/hyphenex.us \
tmac/fr.tmac \
tmac/hyphen.fr \
tmac/sv.tmac \
tmac/hyphen.sv \
tmac/de.tmac \
tmac/den.tmac \
tmac/hyphen.det \
tmac/hyphen.den \
tmac/cs.tmac \
tmac/hyphen.cs \
tmac/hyphenex.cs \
tmac/ja.tmac \
tmac/zh.tmac
NORMALFILES = `echo $(TMACNORMALFILES) | sed -e "s|tmac/||g"`
# TMACSTRIPFILES are built from their unstripped version (-u)
TMACSTRIPFILES = tmac/e.tmac tmac/doc.tmac tmac/doc-old.tmac
# Files installed in tmacdir
dist_tmac_DATA = $(TMACNORMALFILES) tmac/an.tmac tmac/s.tmac
nodist_tmac_DATA = $(TMACSTRIPFILES) tmac/www.tmac
TMACMDOCFILES = \
tmac/doc-common \
tmac/doc-ditroff \
tmac/doc-nroff \
tmac/doc-syms
MDOCFILES = `echo $(TMACMDOCFILES) | sed -e "s|tmac/||g"`
mdocdir=$(tmacdir)/mdoc
# Files installed in mdocdir
nodist_mdoc_DATA = $(TMACMDOCFILES)
# Installed in localtmacdir
dist_localtmac_DATA = tmac/man.local tmac/mdoc.local
MOSTLYCLEANFILES += $(TMACMDOCFILES) tmac/www.tmac $(TMACSTRIPFILES) \
tmac/stamp-wrap \
tmac/*-wrap
EXTRA_DIST += \
tmac/fixmacros.sed \
tmac/groff_ms.7.man \
tmac/groff_man.7.man \
tmac/groff_me.7.man \
tmac/groff_mdoc.7.man \
tmac/groff_trace.7.man \
tmac/groff_www.7.man \
tmac/hyphenex.pl \
tmac/LOCALIZATION \
tmac/man.ultrix \
tmac/psfig.tmac \
tmac/ptx.tmac \
tmac/strip.sed \
tmac/TESTING-HINTS \
tmac/TODO \
tmac/www.tmac.in
dist-hook: tmac-dist-hook
tmac-dist-hook:
chmod u+w $(distdir)/tmac
for f in $(TMACMDOCFILES) $(TMACSTRIPFILES); do \
cp -f $(top_srcdir)/$$f-u $(distdir)/tmac; \
done
$(TMACMDOCFILES) $(TMACSTRIPFILES):
$(MKDIR_P) $(top_builddir)/tmac
for f in $(TMACMDOCFILES) $(TMACSTRIPFILES); do \
sed -f $(tmac_srcdir)/strip.sed $(top_srcdir)/$$f-u > $(top_builddir)/$$f; \
done
tmac/www.tmac: tmac/www.tmac.in
$(MKDIR_P) $(top_builddir)/tmac
sed -e "s;[@]PNMTOPS_NOSETPAGE[@];$(pnmtops_nosetpage);g" \
$(tmac_srcdir)/www.tmac.in > $(top_builddir)/tmac/www.tmac
# The installation of groff compatibility wrappers for vendor-provided
# non-GNU macro sets is controlled by 'compatibility_wrappers' (see the
# commentary surrounding m4/groff.m4's
# GROFF_WITH_COMPATIBILITY_WRAPPERS). Collision detection variables of
# the form 'tmac__prefix' are defined in Makefile.am, to assist
# in the installation of groff-provided macro sets.
#
# When 'compatibility_wrappers' is 'no', one step is performed:
# - the groff-provided macro set implementations are installed in
# /share/groff//tmac/ with the original macro set
# name
#
# When 'compatibility_wrappers' is 'yes', two steps are performed:
# - the groff-provided macro set implementations are installed in
# /share/groff//tmac/ with a prefix of
# $(tmac_prefix) (which is usually 'g', via the appropriate
# collision detection variable)
# - the generated compatibility wrappers are installed in
# /lib/groff/site-tmac, with the original macro set name
#
# When 'compatibility_wrappers' is 'manual', two steps are performed:
# - the groff-provided macro set implementations are installed in
# /share/groff//tmac/ with the original macro set
# name
# - the generated compatibility wrappers are installed in
# /lib/groff/site-tmac, with a name of
# , (which is usually '-os', see
# 'wrapper_suffix_default' in Makefile.am)
all: tmac/stamp-wrap
# Generate groff compatibility wrappers for all non-GNU OS provided
# macro sets.
tmac/stamp-wrap:
$(MKDIR_P) $(top_builddir)/tmac;
if test -n "$(tmac_wrap)"; then \
for m in ""$(tmac_wrap); do \
$(RM) $(top_builddir)/tmac/$$m-wrap; \
if test "$$m" = an; then \
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; \
done; \
fi
touch $@
# Install groff compatibility wrappers into
# /lib/groff/site-tmac.
install-data-local: install_tmac_wrap
install_tmac_wrap:
$(MKDIR_P) $(DESTDIR)$(systemtmacdir);
if test "$(compatibility_wrappers)" != "no"; then \
if test -n "$(tmac_wrap)"; then \
for m in ""$(tmac_wrap); do \
$(INSTALL_DATA) $(tmac_builddir)/$$m-wrap \
$(DESTDIR)$(systemtmacdir)/$$m$(wrapper_suffix).tmac; \
done; \
fi; \
fi
# Rename the groff implementations of colliding macro sets to have a
# prefix.
install-data-hook: install_tmac_wrap_hook
install_tmac_wrap_hook:
if test "$(compatibility_wrappers)" = "yes"; then \
if test -n "$(tmac_wrap)"; then \
if test -f $(DESTDIR)$(tmacdir)/s.tmac -a -n "$(tmac_s_prefix)"; \
then \
mv $(DESTDIR)$(tmacdir)/s.tmac \
$(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac; \
fi; \
if test -f $(DESTDIR)$(tmacdir)/an.tmac -a -n "$(tmac_an_prefix)"; \
then \
mv $(DESTDIR)$(tmacdir)/an.tmac \
$(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac; \
fi; \
fi; \
fi
# Uninstall groff compatibility wrappers & renamed groff implementation
# macro sets.
uninstall_groffdirs: uninstall_tmac_hook
uninstall_tmac_hook:
if test -n "$(tmac_wrap)"; then \
if test "$(compatibility_wrappers)" != "no"; then \
for m in ""$(tmac_wrap); do \
$(RM) $(DESTDIR)$(systemtmacdir)/$$m$(wrapper_suffix).tmac; \
done; \
fi; \
$(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); \
fi
if test -d $(DESTDIR)$(tmacdir); then \
rmdir $(DESTDIR)$(tmacdir); \
fi
if test -d $(DESTDIR)$(localtmacdir); then \
rmdir $(DESTDIR)$(localtmacdir); \
fi
########################################################################
# Editor settings
########################################################################
#
# Local Variables:
# mode: makefile-automake
# fill-column: 72
# End:
# vim: set filetype=automake textwidth=72: