* tmac/eqnrc (.EQ, .EN): Provide default definitions. Reported
[s-roff.git] / contrib / mm / Makefile.sub
blob88446b957e4acb15d962ba6c17a53a45f32b306a
1 # Copyright 1991, 1992, 1993, 1999, 2000, 2001, 2006, 2007
2
3 # This file is part of groff.
4
5 # groff is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free
7 # Software Foundation; either version 2, or (at your option) any later
8 # version.
9
10 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
11 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13 # for more details.
14
15 # You should have received a copy of the GNU General Public License along
16 # with groff; see the file COPYING.  If not, write to the Free Software
17 # Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
19 # Makefile.sub
22 PROG=mmroff
23 MAN1=\
24   mmroff.n
25 MAN7=\
26   groff_mm.n \
27   groff_mmse.n
28 FILES=0.MT 5.MT 4.MT ms.cov se_ms.cov 
29 # Local configuration files with default values.
30 LOCALE=locale se_locale
31 CLEANADD=temp
33 all: mmroff
35 install_bin: install_mmroff
37 install_data: install_m
38         -test -d $(DESTDIR)$(tmacdir)/mm \
39           || $(mkinstalldirs) $(DESTDIR)$(tmacdir)/mm
40         -for f in $(FILES); do \
41                 rm -f $(DESTDIR)$(tmacdir)/mm/$$f; \
42                 $(INSTALL_DATA) $(srcdir)/mm/$$f $(DESTDIR)$(tmacdir)/mm/$$f; \
43         done
44         -for f in $(LOCALE); do \
45                 test -f $(DESTDIR)$(tmacdir)/mm/$$f \
46                   || touch $(DESTDIR)$(tmacdir)/mm/$$f; \
47         done
49 install_m:
50         -test -d $(DESTDIR)$(tmacdir) \
51           || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
52         -rm -f $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
53         -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
54         $(INSTALL_DATA) $(srcdir)/m.tmac \
55           $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
56         @sed -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
57           $(srcdir)/mse.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
58         @sed -e "s;^.mso mse.tmac;.mso $(tmac_m_prefix)mse.tmac;g" \
59           $(srcdir)/mmse.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
60         @sed -e "s;^.mso m.tmac;.mso $(tmac_m_prefix)m.tmac;g" \
61           $(srcdir)/mm.tmac > $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
63 install_mmroff: mmroff
64         -test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
65         -rm -f $(DESTDIR)$(bindir)/mmroff
66         $(INSTALL_SCRIPT) mmroff $(DESTDIR)$(bindir)/mmroff
68 mmroff: mmroff.pl
69         -rm -f $@
70         -sed -e 's;/usr/bin/perl;$(PERLPATH);' $(srcdir)/mmroff.pl >$@
71         -chmod +x $@
73 uninstall_sub:
74         -for f in $(FILES); do \
75                 rm -f $(DESTDIR)$(tmacdir)/mm/$$f; \
76         done
77         -for f in $(LOCALE); do \
78                 test -s $(DESTDIR)$(tmacdir)/mm/$$f \
79                   || rm -f $(DESTDIR)$(tmacdir)/mm/$$f; \
80         done
81         -rm -f $(DESTDIR)$(tmacdir)/tmac.$(tmac_m_prefix)m
82         -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)m.tmac
83         -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mm.tmac
84         -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mse.tmac
85         -rm -f $(DESTDIR)$(tmacdir)/$(tmac_m_prefix)mmse.tmac
86         -rmdir $(DESTDIR)$(tmacdir)/mm
87         -rm -f $(DESTDIR)$(bindir)/mmroff