1 # Copyright (C) 2002 Free Software Foundation, Inc.
2 # Written by Werner Lemberg <wl@gnu.org>
4 # This file is part of groff.
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
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
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
26 # to get the groff texinfo manual as a PDF file.
28 # Note that you have to compile the groff package first.
32 top_srcdir=@top_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.
41 # Users who want to print out the groff manual are expected to have
42 # a working TeX installation.
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_COMMAND_PREFIX=''; \
72 export GROFF_COMMAND_PREFIX; \
73 GROFF_BIN_PATH=$(groff_bin_path); \
74 export GROFF_BIN_PATH; \
75 sed -e "s;@VERSION@;$(version)$(revision);" $< \
76 | $(top_builddir)/src/roff/groff/groff $(TFLAG) $(FFLAG) -Upet -ww
80 .SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf
82 # For simplicity, we always call grn and eqn.
84 $(GROFF) -Tascii -ge -me >$@
86 $(GROFF) -Tps -ge -me >$@
89 $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
90 -P-D$(imagedir) -Thtml -ms >$@
92 $(GROFF) -Tascii -ms -mwww >$@
94 $(GROFF) -Tps -ms -mwww >$@
99 $(TEXI2DVI) -e --pdf $<
101 $(MAKEINFO) -I$(srcdir) --html --no-split $<
104 all: prepare_examples
106 prepare_examples: grnexmpl.g
107 test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
110 $(MAKEINFO) -I$(srcdir) $(srcdir)/groff.texinfo
113 xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtops -noturn >$@
115 xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
117 webpage.html: webpage.ms gnu.png gnu.eps
120 grnexmpl.ps: grnexmpl.me grnexmpl.g
124 -rm -f *.ps *.html *.txt *.png *.eps *.gif *.dit core
125 -rm -f *.aux *.dvi *.pdf *.log *.toc texput.log
126 -rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \
127 *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \
128 *.tp *.tps *.tr *.vr *.vrs
136 -rm -f core *~ \#* junk temp grot