Minor fixes from Bernd.
[s-roff.git] / doc / Makefile.in
blobaf79e242eea18bd2b640e8cfdb25a785938b722e
1 # Copyright (C) 2002 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.
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.
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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 # Use this file to produce documentation in various formats; e.g. you can
22 # say
24 # make groff.pdf
26 # to get the groff texinfo manual as a PDF file.
28 # Note that you have to compile the groff package first.
31 srcdir=@srcdir@
32 top_srcdir=@top_srcdir@
33 VPATH=@srcdir@
34 top_builddir=@groff_top_builddir@
37 # Since info files are distributed within the groff package, no
38 # autoconf test for the makeinfo binary is done.
39 MAKEINFO=makeinfo
41 # Users who want to print out the groff manual are expected to have
42 # a working TeX installation.
43 TEXI2DVI=texi2dvi
45 groff_bin_dirs=\
46 $(top_builddir)/src/roff/groff \
47 $(top_builddir)/src/roff/troff \
48 $(top_builddir)/src/preproc/pic \
49 $(top_builddir)/src/preproc/eqn \
50 $(top_builddir)/src/preproc/tbl \
51 $(top_builddir)/src/preproc/grn \
52 $(top_builddir)/src/preproc/refer \
53 $(top_builddir)/src/preproc/soelim \
54 $(top_builddir)/src/preproc/html \
55 $(top_builddir)/src/devices/grops \
56 $(top_builddir)/src/devices/grodvi \
57 $(top_builddir)/src/devices/grotty \
58 $(top_builddir)/src/devices/grolj4 \
59 $(top_builddir)/src/devices/grolbp \
60 $(top_builddir)/src/devices/grohtml
61 groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| \+|:|g'`
63 version=`cat $(top_srcdir)/VERSION`
64 # No additional number if revision is zero.
65 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
67 FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
68 TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac
70 TROFF=$(top_builddir)/src/roff/troff/troff $(TFLAG) $(FFLAG) -ww
71 GROFF=GROFF_BIN_PATH=$(groff_bin_path); \
72 export GROFF_BIN_PATH; \
73 sed -e "s;@VERSION@;$(version)$(revision);" $< \
74 | $(top_builddir)/src/roff/groff/groff $(TFLAG) $(FFLAG) -Upet -ww
76 imagedir=img
78 .SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf
80 # For simplicity, we always call grn and eqn.
81 .me.txt:
82 $(GROFF) -Tascii -ge -me >$@
83 .me.ps:
84 $(GROFF) -Tps -ge -me >$@
86 .ms.html:
87 $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
88 -P-D$(imagedir) -Thtml -ms >$@
89 .ms.txt:
90 $(GROFF) -Tascii -ms -mwww >$@
91 .ms.ps:
92 $(GROFF) -Tps -ms -mwww >$@
94 .texinfo.dvi:
95 $(TEXI2DVI) -e $<
96 .texinfo.pdf:
97 $(TEXI2DVI) -e --pdf $<
98 .texinfo.html:
99 $(MAKEINFO) --html --no-split $<
102 all: prepare_examples
104 prepare_examples: grnexmpl.g
105 test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
107 groff: groff.texinfo
108 $(MAKEINFO) -I$(srcdir) $(srcdir)/groff.texinfo
110 gnu.eps: gnu.xpm
111 xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtops -noturn >$@
112 gnu.png: gnu.xpm
113 xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
115 webpage.html: webpage.ms gnu.png
116 webpage.ps: gnu.eps
118 grnexmpl.ps: grnexmpl.me grnexmpl.g
121 clean:
122 -rm -f *.ps *.html *.txt *.png *.eps *.gif *.dit core
123 -rm -f *.aux *.dvi *.pdf *.log *.toc texput.log
124 -rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \
125 *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \
126 *.tp *.tps *.tr *.vr *.vrs
127 -rm -rf img
129 distclean: clean
131 realclean: distclean
133 extraclean: clean
134 -rm -f core *~ \#* junk temp grot