* src/roff/groff/groff.man: Completely rewritten.
[s-roff.git] / doc / Makefile
blobede9b400789176ec242359bac17c9512e460418e
1 # Copyright (C) 1989, 1990, 1991, 1992, 2001 Free Software Foundation, Inc.
2 # Written by James Clark (jjc@jclark.com)
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.
20 FFLAG=-F../font
21 TROFF=../src/roff/troff/troff -M../tmac $(FFLAG)
22 GROFF=../src/roff/groff/groff -p -e -t
23 GROPS=../src/devices/grops/grops $(FFLAG)
24 DOCS=meref.ps meintro.ps pic.ps pic.html homepage.html
25 MEMACROS=../tmac/tmac.e
26 SOELIM=../src/preproc/soelim/soelim
28 groff_bin_dirs=\
29 ../src/roff/groff \
30 ../src/roff/troff \
31 ../src/preproc/pic \
32 ../src/preproc/eqn \
33 ../src/preproc/tbl \
34 ../src/preproc/grn \
35 ../src/preproc/refer \
36 ../src/preproc/soelim \
37 ../src/preproc/html \
38 ../src/devices/grops \
39 ../src/devices/grodvi \
40 ../src/devices/grotty \
41 ../src/devices/grolj4 \
42 ../src/devices/grolbp \
43 ../src/devices/grohtml
44 groff_bin_path=`echo $(groff_bin_dirs) | sed -e 's| \+|:|g'`
46 version=`cat ../VERSION`
47 # No additional number if revision is zero
48 revision=`sed -e 's/^0$$//' -e 's/^[1-9].*$$/.&/' ../REVISION`
50 all: $(DOCS)
52 .SUFFIXES: .tr .me .ms .ps .dit .html .ascii .texinfo .dvi
54 .dit.ps:
55 $(GROPS) $< >$@
57 .me.dit:
58 $(SOELIM) $< \
59 | sed -e "s;@VERSION@;$(version)$(revision);" \
60 | $(TROFF) -Tps $(FFLAG) -me >$@
62 .tr.dit:
63 $(TROFF) -Tps $< >$@
65 .ms.html:
66 GROFF_TMAC_PATH=../tmac; \
67 export GROFF_TMAC_PATH; \
68 GROFF_BIN_PATH=$(groff_bin_path); \
69 export GROFF_BIN_PATH; \
70 sed -e "s;@VERSION@;$(version)$(revision);" $< \
71 | $(GROFF) -P-b -P-I`echo $< | sed -e 's|.ms$$||'` \
72 -P-D -Pimg -Thtml $(FFLAG) -U -ms >$@
74 .ms.ascii:
75 GROFF_TMAC_PATH=../tmac; \
76 export GROFF_TMAC_PATH; \
77 GROFF_BIN_PATH=$(groff_bin_path); \
78 export GROFF_BIN_PATH; \
79 sed -e "s;@VERSION@;$(version)$(revision);" $< \
80 | $(GROFF) -Tascii $(FFLAG) -U -ms -mwww >$@
82 .ms.ps:
83 GROFF_TMAC_PATH=../tmac; \
84 export GROFF_TMAC_PATH; \
85 GROFF_BIN_PATH=$(groff_bin_path); \
86 export GROFF_BIN_PATH; \
87 sed -e "s;@VERSION@;$(version)$(revision);" $< \
88 | $(GROFF) -Tps $(FFLAG) -U -ms -mwww >$@
90 .texinfo.dvi:
91 texi2dvi -e $<
93 groff: groff.texinfo
94 makeinfo groff.texinfo
96 gnubw.eps: gnupng
97 pngtopnm gnupng | pnmscale 0.1 | pnmtops -noturn > gnubw.eps
99 homepage.html: gnubw.eps
101 install:
103 clean:
104 -rm -f *.ps *.html *.ascii *.png *.gif *.dit core
105 -rm -f *.aux *.dvi *.log *.toc texput.log
106 -rm -f *.cp *.cps *.cv *.cn *.es *.ess *.fn *.fns *.ky *.kys \
107 *.ma *.mas *.op *.ops *.pg *.pgs *.rq *.rqs *.st *.sts \
108 *.tp *.tps *.tr *.vr *.vrs
109 -rm -rf img
111 distclean: clean
113 realclean: distclean
115 extraclean: clean
116 -rm -f core *~ \#* junk temp grot