1 # Copyright 1991-2018 Free Software Foundation, Inc.
3 # Last update: 22 Aug 2015
5 # This file is part of groff.
7 # groff is free software; you can redistribute it and/or modify it under
8 # the terms of the GNU General Public License as published by the Free
9 # Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 # You should have received a copy of the GNU General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 mm_srcdir = $(top_srcdir)/contrib/mm
24 mm_builddir = $(top_builddir)/contrib/mm
28 man1_MANS += contrib/mm/mmroff.1
30 contrib/mm/groff_mm.7 \
31 contrib/mm/groff_mmse.7
33 # Files installed in $(tmacdir)/mm
38 contrib/mm/mm/ms.cov \
39 contrib/mm/mm/se_ms.cov
41 dist_mm_DATA = $(MMFILES)
43 # Files installed in $(tmacdir)
44 tmacmmdir = $(tmacdir)
45 dist_tmacmm_DATA = contrib/mm/refer-mm.tmac
48 contrib/mm/examples/letter.mm
50 mmexampledir=$(exampledir)/mm
51 dist_mmexample_DATA = $(MMEXAMPLEFILES)
53 # Local configuration files with default values.
59 contrib/mm/ChangeLog \
61 contrib/mm/Makefile.sim \
65 contrib/mm/groff_mm.7.man \
66 contrib/mm/groff_mmse.7.man \
67 contrib/mm/mmroff.1.man \
71 mmroff: $(mm_srcdir)/mmroff.pl
72 $(AM_V_GEN)$(SED) -e 's;/usr/bin/perl;$(PERL);' \
73 $(mm_srcdir)/mmroff.pl \
77 # Special installation rules for m.tmac, mse.tmac, mmse.tmac, mm.tmac
79 install-data-local: install_mm
81 -test -d $(DESTDIR)$(tmacdir) || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
82 -test -d $(DESTDIR)$(mmdir) || $(mkinstalldirs) $(DESTDIR)$(mmdir)
83 $(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
84 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
85 $(INSTALL_DATA) $(mm_srcdir)/m.tmac \
86 $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
87 $(SED) -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
88 $(mm_srcdir)/mse.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
89 @$(SED) -e "s;^.mso mse.tmac;.mso $(tmac_m_prefix)mse.tmac;g" \
90 $(mm_srcdir)/mmse.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
91 @$(SED) -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
92 $(mm_srcdir)/mm.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
93 @for f in $(MMLOCALE); do \
94 test -f $(DESTDIR)$(tmacdir)/mm/$$f \
95 || touch $(DESTDIR)$(tmacdir)/mm/$$f; \
97 uninstall-local: uninstall_mm
99 if test -d $(DESTDIR)$(mmexampledir); then \
100 rmdir $(DESTDIR)$(mmexampledir); \
102 -for f in $(MMLOCALE); do \
103 test -s $(DESTDIR)$(tmacdir)/mm/$$f \
104 || $(RM) $(DESTDIR)$(tmacdir)/mm/$$f; \
106 $(RM) $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
107 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
108 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
109 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
110 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
111 -rmdir $(DESTDIR)$(tmacdir)/mm
113 # Special distribution rule: we copy all .tmac files from contrib/mm
116 chmod u+w $(distdir)/contrib/mm/
117 for i in $(mm_srcdir)/*.tmac; do \
118 cp -f $$i $(distdir)/contrib/mm/; \
122 ########################################################################
125 # mode: makefile-automake
127 # vim: set filetype=automake: