* Makefile.in (NOMAKEDIRS): Add contrib/gdiffmk/tests.
[s-roff.git] / doc / Makefile.in
blob18da219a8446253e7dfe5cf1b523b81482f02a91
1 # Copyright (C) 2002, 2003, 2004, 2005 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=@abs_top_srcdir@
33 VPATH=@srcdir@
34 top_builddir=@abs_top_builddir@
35 pnmtops=@pnmtops_nosetpage@
37 # These may be overridden if cross-compiling.
38 TROFFBIN=$(top_builddir)/src/roff/troff/troff
39 GROFFBIN=$(top_builddir)/src/roff/groff/groff
40 GROFF_BIN_PATH=`echo $(groff_bin_dirs) | sed -e 's| *|:|g'`
42 # Since info files are distributed within the groff package, no
43 # autoconf test for the makeinfo binary is done.
44 MAKEINFO=makeinfo
46 # Users who want to print out the groff manual are expected to have
47 # a working TeX installation.
48 TEXI2DVI=texi2dvi
50 groff_bin_dirs=\
51 $(top_builddir)/src/roff/groff \
52 $(top_builddir)/src/roff/troff \
53 $(top_builddir)/src/preproc/pic \
54 $(top_builddir)/src/preproc/eqn \
55 $(top_builddir)/src/preproc/tbl \
56 $(top_builddir)/src/preproc/grn \
57 $(top_builddir)/src/preproc/refer \
58 $(top_builddir)/src/preproc/soelim \
59 $(top_builddir)/src/preproc/html \
60 $(top_builddir)/src/devices/grops \
61 $(top_builddir)/src/devices/grodvi \
62 $(top_builddir)/src/devices/grotty \
63 $(top_builddir)/src/devices/grolj4 \
64 $(top_builddir)/src/devices/grolbp \
65 $(top_builddir)/src/devices/grohtml
67 version=`cat $(top_srcdir)/VERSION`
68 # No additional number if revision is zero.
69 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' $(top_srcdir)/REVISION`
71 FFLAG=-F$(top_builddir)/font -F$(top_srcdir)/font
72 TFLAG=-M$(top_builddir)/tmac -M$(top_srcdir)/tmac
74 TROFF=$(TROFFBIN) $(TFLAG) $(FFLAG) -ww
75 GROFF=GROFF_COMMAND_PREFIX=''; \
76 export GROFF_COMMAND_PREFIX; \
77 GROFF_BIN_PATH=$(GROFF_BIN_PATH); \
78 export GROFF_BIN_PATH; \
79 sed -e "s;@VERSION@;$(version)$(revision);" $< \
80 | $(GROFFBIN) $(TFLAG) $(FFLAG) -Upet -ww
82 imagedir=img
84 .SUFFIXES: .me .ms .ps .html .txt .texinfo .dvi .pdf
85 .PHONY: all prepare_examples clean distclean realclean extraclean
87 # For simplicity, we always call grn and eqn.
88 .me.txt:
89 $(GROFF) -Tascii -ge -me >$@
90 .me.ps:
91 $(GROFF) -Tps -ge -me >$@
93 .ms.html:
94 $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
95 -P-D$(imagedir) -Thtml -ms >$@
96 .ms.txt:
97 $(GROFF) -Tascii -ms -mwww >$@
98 .ms.ps:
99 $(GROFF) -Tps -ms -mwww >$@
101 .texinfo.dvi:
102 $(TEXI2DVI) -e $<
103 .texinfo.pdf:
104 $(TEXI2DVI) -e --pdf $<
105 .texinfo.html:
106 $(MAKEINFO) --enable-encoding -I$(srcdir) --html --no-split $< \
107 && $(SHELL) $(srcdir)/fixinfo.sh $@
110 all: prepare_examples
112 prepare_examples: grnexmpl.g groff.css
113 test -f grnexmpl.g || cp $(srcdir)/grnexmpl.g .
114 test -f groff.css || cp $(srcdir)/groff.css .
116 groff: groff.texinfo
117 $(MAKEINFO) --enable-encoding -I$(srcdir) $(srcdir)/groff.texinfo
119 gnu.eps: gnu.xpm
120 xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | $(pnmtops) -noturn >$@
121 gnu.png: gnu.xpm
122 xpmtoppm $(srcdir)/gnu.xpm | pnmdepth 15 | pnmtopng >$@
124 pic.html: pic.ms
125 $(GROFF) -P-p -P-b -P-I`basename $< | sed -e 's|.ms$$||'` \
126 -P-D$(imagedir) -P-j`basename $< | sed -e 's|.ms$$||'` \
127 -Thtml -ms >$@
129 webpage.html: webpage.ms gnu.png gnu.eps groff.css
130 webpage.ps: gnu.eps
132 grnexmpl.ps: grnexmpl.me grnexmpl.g
135 clean:
136 -rm -f *.ps *.html *.txt core
137 -rm -f *.aux *.dvi *.pdf *.log *.toc texput.log
138 -rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \
139 *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \
140 *.tp *.tps *.tr *.vr *.vrs
141 -rm -rf img
143 distclean: clean
145 realclean: distclean
146 -rm -f *.png *.eps
148 extraclean: distclean
149 -rm -f core *~ \#* junk temp grot