1 # Makefile.sub for `tmac'
3 # File position: <groff-source>/tmac/Makefile.sub
5 # Copyright (C) 1989-2014 Free Software Foundation, Inc.
6 # Written by James Clark (jjc@jclark.com)
8 # This file is part of groff.
10 # groff is free software; you can redistribute it and/or modify it under
11 # the terms of the GNU General Public License as published by the Free
12 # Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
16 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 # You should have received a copy of the GNU General Public License
21 # along with this program. If not, see <http://www.gnu.org/licenses/>.
23 ########################################################################
34 man.tmac mandoc.tmac andoc.tmac an-old.tmac an-ext.tmac \
39 a4.tmac papersize.tmac \
44 ps.tmac psold.tmac pspic.tmac psatk.tmac \
47 tty.tmac tty-char.tmac \
48 latin1.tmac latin2.tmac latin5.tmac latin9.tmac cp1047.tmac \
53 html.tmac html-end.tmac \
56 composite.tmac fallbacks.tmac \
58 refer.tmac refer-me.tmac refer-ms.tmac \
61 hyphen.us hyphenex.us \
64 de.tmac den.tmac hyphen.det hyphen.den hyphenex.det \
65 cs.tmac hyphen.cs hyphenex.cs \
68 # These files are handled specially during installation and deinstallation.
69 SPECIALFILES=an.tmac s.tmac www.tmac
71 # These files are processed with `strip.sed'.
72 STRIPFILES=e.tmac doc.tmac doc-old.tmac
73 MDOCFILES=doc-common doc-ditroff doc-nroff doc-syms
74 mdocdir=$(tmacdir)/mdoc
77 stamp-wrap stamp-sed *-wrap www.tmac-sed \
78 stamp-strip e.tmac-s doc.tmac-s doc-old.tmac-s \
79 doc-common-s doc-ditroff-s doc-nroff-s doc-syms-s mdoc.local-s
84 pnmtops_nosetpage="pnmtops"
88 all: stamp-strip stamp-wrap stamp-sed
90 install_data: $(NORMALFILES) $(SPECIALFILES) man.local \
91 stamp-strip stamp-wrap stamp-sed
92 -test -d $(DESTDIR)$(tmacdir) \
93 || $(mkinstalldirs) $(DESTDIR)$(tmacdir)
94 -test -d $(DESTDIR)$(systemtmacdir) \
95 || $(mkinstalldirs) $(DESTDIR)$(systemtmacdir)
96 -test -d $(DESTDIR)$(localtmacdir) \
97 || $(mkinstalldirs) $(DESTDIR)$(localtmacdir)
98 if test -n "$(tmac_wrap)"; then \
99 for m in ""$(tmac_wrap); do \
100 $(INSTALL_DATA) $$m-wrap $(DESTDIR)$(systemtmacdir)/$$m.tmac; \
103 for f in $(NORMALFILES); do \
104 $(RM) $(DESTDIR)$(tmacdir)/$$f; \
105 $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(tmacdir)/$$f; \
107 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
108 $(INSTALL_DATA) $(srcdir)/s.tmac \
109 $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
110 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
111 $(INSTALL_DATA) $(srcdir)/an.tmac \
112 $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
113 $(RM) $(DESTDIR)$(tmacdir)/www.tmac
114 $(INSTALL_DATA) www.tmac-sed $(DESTDIR)$(tmacdir)/www.tmac
115 for f in $(STRIPFILES); do \
116 $(RM) $(DESTDIR)$(tmacdir)/$$f; \
117 $(INSTALL_DATA) $$f-s $(DESTDIR)$(tmacdir)/$$f; \
119 -test -d $(DESTDIR)$(mdocdir) || $(mkinstalldirs) $(DESTDIR)$(mdocdir)
120 for f in $(MDOCFILES); do \
121 $(RM) $(DESTDIR)$(mdocdir)/$$f; \
122 $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \
124 -test -f $(DESTDIR)$(localtmacdir)/man.local \
125 || $(INSTALL_DATA) $(srcdir)/man.local \
126 $(DESTDIR)$(localtmacdir)/man.local
127 -test -f $(DESTDIR)$(localtmacdir)/mdoc.local \
128 || $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local
130 stamp-strip: $(STRIPFILES) $(MDOCFILES) mdoc.local
131 for f in $(STRIPFILES) $(MDOCFILES) mdoc.local; do \
133 sed -f $(srcdir)/strip.sed $(srcdir)/$$f >$$f-s; \
138 if test -n "$(tmac_wrap)"; then \
139 for m in ""$(tmac_wrap); do \
141 if test "$$m" = an; then \
142 echo .do mso andoc.tmac >>$$m-wrap; \
144 echo .cp 1 >>$$m-wrap; \
145 echo .so $(sys_tmac_prefix)$$m >>$$m-wrap; \
151 sed -e "s;@PNMTOPS_NOSETPAGE@;$(pnmtops_nosetpage);g" \
152 $(srcdir)/www.tmac > www.tmac-sed
156 -if test -n "$(tmac_wrap)"; then \
157 for m in ""$(tmac_wrap); do \
158 $(RM) $(DESTDIR)$(systemtmacdir)/$$m.tmac; \
161 -for f in $(NORMALFILES) $(STRIPFILES); do \
162 $(RM) $(DESTDIR)$(tmacdir)/$$f; \
164 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac
165 $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac
166 $(RM) $(DESTDIR)$(tmacdir)/www.tmac
167 -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \
168 $(srcdir)/man.local; then \
169 $(RM) $(DESTDIR)$(localtmacdir)/man.local; \
171 -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \
172 $(srcdir)/mdoc.local; then \
173 $(RM) $(DESTDIR)$(localtmacdir)/mdoc.local; \
175 -for f in $(MDOCFILES); do $(RM) $(DESTDIR)$(mdocdir)/$$f; done
176 -test -d $(DESTDIR)$(mdocdir) && rmdir $(DESTDIR)$(mdocdir)
178 ########################################################################
180 ########################################################################