* All affected files: Update postal address of FSF.
[s-roff.git] / contrib / mom / Makefile.sub
blob7145740221fa6fb2958c0cffda33449627aef24e
1 # Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
2 #      Written by Werner Lemberg (wl@gnu.org)
3
4 # This file is part of groff.
5
6 # groff is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation; either version 2, or (at your option) any later
9 # version.
10
11 # groff is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14 # for more details.
15
16 # You should have received a copy of the GNU General Public License along
17 # with groff; see the file COPYING.  If not, write to the Free Software
18 # Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
20 # These may be overridden if cross-compiling.
21 GROFFBIN=$(top_builddir)/src/roff/groff/groff
22 GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's|  *|$(SH_SEP)|g'`
24 groff_bin_dirs=\
25   $(top_builddir)/src/roff/groff \
26   $(top_builddir)/src/roff/troff \
27   $(top_builddir)/src/devices/grops
29 FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
30 TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac -M$(srcdir)
32 GROFF=GROFF_COMMAND_PREFIX=''; \
33       export GROFF_COMMAND_PREFIX; \
34       GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
35       export GROFF_BIN_PATH; \
36       $(GROFFBIN) $(FFLAG) $(TFLAG)
38 MAN7=\
39   groff_mom.n
41 NORMALFILES=\
42   mom.tmac \
43   om.tmac
45 HTMLDOCFILES=\
46   momdoc/appendices.html \
47   momdoc/color.html \
48   momdoc/cover.html \
49   momdoc/definitions.html \
50   momdoc/docelement.html \
51   momdoc/docprocessing.html \
52   momdoc/goodies.html \
53   momdoc/headfootpage.html \
54   momdoc/inlines.html \
55   momdoc/intro.html \
56   momdoc/letters.html \
57   momdoc/macrolist.html \
58   momdoc/rectoverso.html \
59   momdoc/reserved.html \
60   momdoc/toc.html \
61   momdoc/typemacdoc.html \
62   momdoc/typesetting.html \
63   momdoc/using.html
65 EXAMPLEFILES=\
66   examples/letter.mom \
67   examples/sample_docs.mom \
68   examples/typesetting.mom \
69   examples/README.txt \
70   examples/elvis_syntax \
71   examples/elvis_syntax.new \
72   examples/penguin.ps
74 PROCESSEDEXAMPLEFILES=\
75   examples/letter.ps \
76   examples/sample_docs.ps \
77   examples/typesetting.ps
79 CLEANADD=\
80   penguin.ps \
81   $(PROCESSEDEXAMPLEFILES) \
82   examples/stamp
84 .SUFFIXES: .mom .ps
85 .mom.ps:
86         $(GROFF) -Tps -mom $< >$@
89 all: $(PROCESSEDEXAMPLEFILES)
91 $(PROCESSEDEXAMPLEFILES): penguin.ps examples/stamp
93 penguin.ps:
94         cp $(srcdir)/examples/penguin.ps .
96 examples/stamp:
97         test -d examples || $(mkinstalldirs) examples
98         touch $@
100 install_data: $(NORMALFILES) $(HTMLDOCFILES) \
101               $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES)
102         -test -d $(tmacdir) || $(mkinstalldirs) $(tmacdir)
103         for f in $(NORMALFILES); do \
104           rm -f $(tmacdir)/$$f; \
105           $(INSTALL_DATA) $(srcdir)/$$f $(tmacdir)/$$f; \
106         done
107         -test -d $(htmldocdir)/momdoc || $(mkinstalldirs) $(htmldocdir)/momdoc
108         for f in $(HTMLDOCFILES); do \
109           rm -f $(htmldocdir)/$$f; \
110           $(INSTALL_DATA) $(srcdir)/$$f $(htmldocdir)/$$f; \
111         done
112         -test -d $(exampledir) || $(mkinstalldirs) $(exampledir)
113         for f in $(EXAMPLEFILES); do \
114           rm -f $(exampledir)/$$f; \
115           $(INSTALL_DATA) $(srcdir)/$$f $(docdir)/$$f; \
116         done
117         for f in $(PROCESSEDEXAMPLEFILES); do \
118           rm -f $(exampledir)/$$f; \
119           $(INSTALL_DATA) $$f $(docdir)/$$f; \
120         done
122 uninstall_sub:
123         -for f in $(NORMALFILES); do \
124           rm -f $(tmacdir)/$$f; \
125         done
126         -for f in $(HTMLDOCFILES); do \
127           rm -f $(htmldocdir)/$$f; \
128         done
129         -rmdir $(htmldocdir)/momdoc
130         -for f in $(EXAMPLEFILES) $(PROCESSEDEXAMPLEFILES); do \
131           rm -f $(docdir)/$$f; \
132         done