Commit | Line | Data |
---|---|---|
d60d9f65 SS |
1 | # This makefile for Readline library documentation is in -*- text -*- mode. |
2 | # Emacs likes it that way. | |
1b17e766 | 3 | |
5bdf8622 | 4 | # Copyright (C) 1996-2004 Free Software Foundation, Inc. |
1b17e766 EZ |
5 | |
6 | # This program is free software; you can redistribute it and/or modify | |
7 | # it under the terms of the GNU General Public License as published by | |
8 | # the Free Software Foundation; either version 2, or (at your option) | |
9 | # any later version. | |
10 | ||
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | ||
16 | # You should have received a copy of the GNU General Public License | |
17 | # along with this program; if not, write to the Free Software | |
18 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. | |
19 | ||
20 | topdir = @top_srcdir@ | |
d60d9f65 SS |
21 | srcdir = @srcdir@ |
22 | VPATH = .:@srcdir@ | |
23 | ||
24 | prefix = @prefix@ | |
25 | infodir = @infodir@ | |
26 | ||
27 | mandir = @mandir@ | |
1b17e766 EZ |
28 | manpfx = man |
29 | ||
9255ee31 EZ |
30 | man1ext = .1 |
31 | man1dir = $(mandir)/$(manpfx)1 | |
32 | man3ext = .3 | |
33 | man3dir = $(mandir)/$(manpfx)3 | |
34 | ||
35 | # set this to a value to have the HTML documentation installed | |
36 | htmldir = | |
37 | ||
38 | # Support an alternate destination root directory for package building | |
39 | DESTDIR = | |
d60d9f65 | 40 | |
c862e87b | 41 | SHELL = @MAKE_SHELL@ |
d60d9f65 SS |
42 | RM = rm -f |
43 | ||
1b17e766 EZ |
44 | INSTALL = @INSTALL@ |
45 | INSTALL_DATA = @INSTALL_DATA@ | |
46 | ||
47 | BUILD_DIR = @BUILD_DIR@ | |
d60d9f65 SS |
48 | TEXINPUTDIR = $(srcdir) |
49 | ||
1b17e766 | 50 | MAKEINFO = LANGUAGE= makeinfo |
d60d9f65 SS |
51 | TEXI2DVI = $(srcdir)/texi2dvi |
52 | TEXI2HTML = $(srcdir)/texi2html | |
53 | QUIETPS = #set this to -q to shut up dvips | |
1b17e766 | 54 | PAPERSIZE = letter |
5bdf8622 | 55 | PSDPI = 600 |
1b17e766 | 56 | DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky |
d60d9f65 | 57 | |
5bdf8622 DJ |
58 | # These tools might not be available; they're not required |
59 | DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE} | |
60 | PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ | |
61 | ||
62 | RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \ | |
63 | $(srcdir)/rltech.texi $(srcdir)/version.texi \ | |
64 | $(srcdir)/rluserman.texi | |
65 | HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \ | |
66 | $(srcdir)/hstech.texi $(srcdir)/version.texi | |
d60d9f65 SS |
67 | |
68 | # This should be a program that converts troff to an ascii-readable format | |
69 | NROFF = groff -Tascii | |
70 | ||
71 | # This should be a program that converts troff to postscript | |
72 | GROFF = groff | |
73 | ||
1b17e766 EZ |
74 | DVIOBJ = readline.dvi history.dvi rluserman.dvi |
75 | INFOOBJ = readline.info history.info rluserman.info | |
9255ee31 | 76 | PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps |
1b17e766 | 77 | HTMLOBJ = readline.html history.html rluserman.html |
9255ee31 | 78 | TEXTOBJ = readline.0 history.0 |
5bdf8622 | 79 | PDFOBJ = readline.pdf history.pdf rluserman.pdf |
d60d9f65 | 80 | |
5bdf8622 | 81 | INTERMEDIATE_OBJ = rlman.dvi |
c862e87b | 82 | |
9255ee31 | 83 | DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ) |
d60d9f65 | 84 | |
5bdf8622 | 85 | .SUFFIXES: .0 .3 .ps .txt .dvi .html .pdf |
d60d9f65 SS |
86 | |
87 | .3.0: | |
88 | $(RM) $@ | |
89 | -${NROFF} -man $< > $@ | |
90 | ||
5bdf8622 DJ |
91 | .ps.pdf: |
92 | $(RM) $@ | |
93 | -${PSPDF} $< | |
94 | ||
95 | .dvi.pdf: | |
96 | $(RM) $@ | |
97 | -${DVIPDF} $< | |
98 | ||
d60d9f65 SS |
99 | all: info dvi html ps text |
100 | nodvi: info html text | |
101 | ||
5bdf8622 DJ |
102 | info: $(INFOOBJ) |
103 | dvi: $(DVIOBJ) | |
104 | ps: $(PSOBJ) | |
105 | html: $(HTMLOBJ) | |
106 | text: $(TEXTOBJ) | |
107 | pdf: $(PDFOBJ) | |
108 | ||
d60d9f65 | 109 | readline.dvi: $(RLSRC) |
5bdf8622 | 110 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi |
d60d9f65 SS |
111 | mv rlman.dvi readline.dvi |
112 | ||
113 | readline.info: $(RLSRC) | |
5bdf8622 | 114 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi |
d60d9f65 | 115 | |
1b17e766 | 116 | rluserman.dvi: $(RLSRC) |
5bdf8622 | 117 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi |
1b17e766 EZ |
118 | |
119 | rluserman.info: $(RLSRC) | |
5bdf8622 | 120 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi |
1b17e766 | 121 | |
d60d9f65 | 122 | history.dvi: ${HISTSRC} |
5bdf8622 | 123 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi |
d60d9f65 SS |
124 | |
125 | history.info: ${HISTSRC} | |
5bdf8622 | 126 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi |
d60d9f65 SS |
127 | |
128 | readline.ps: readline.dvi | |
129 | $(RM) $@ | |
130 | $(DVIPS) readline.dvi | |
131 | ||
1b17e766 EZ |
132 | rluserman.ps: rluserman.dvi |
133 | $(RM) $@ | |
134 | $(DVIPS) rluserman.dvi | |
135 | ||
d60d9f65 SS |
136 | history.ps: history.dvi |
137 | $(RM) $@ | |
138 | $(DVIPS) history.dvi | |
139 | ||
9255ee31 EZ |
140 | # |
141 | # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org | |
142 | # | |
d60d9f65 | 143 | readline.html: ${RLSRC} |
5bdf8622 | 144 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi |
1b17e766 | 145 | sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html |
5bdf8622 | 146 | $(RM) rlman.html |
d60d9f65 | 147 | |
1b17e766 | 148 | rluserman.html: ${RLSRC} |
5bdf8622 | 149 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi |
1b17e766 | 150 | |
d60d9f65 | 151 | history.html: ${HISTSRC} |
5bdf8622 | 152 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi |
d60d9f65 SS |
153 | |
154 | readline.0: readline.3 | |
155 | ||
9255ee31 EZ |
156 | readline_3.ps: readline.3 |
157 | ${RM} $@ | |
158 | ${GROFF} -man < $(srcdir)/readline.3 > $@ | |
159 | ||
160 | history.0: history.3 | |
161 | ||
162 | history_3.ps: history.3 | |
163 | ${RM} $@ | |
164 | ${GROFF} -man < $(srcdir)/history.3 > $@ | |
165 | ||
5bdf8622 DJ |
166 | readline.pdf: readline.dvi |
167 | history.pdf: history.dvi | |
168 | rluserman.pdf: rluserman.dvi | |
169 | ||
d60d9f65 | 170 | clean: |
5bdf8622 DJ |
171 | $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \ |
172 | *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o \ | |
173 | core *.core | |
9255ee31 EZ |
174 | |
175 | mostlyclean: clean | |
d60d9f65 | 176 | |
9255ee31 | 177 | distclean: clean maybe-clean |
c862e87b | 178 | $(RM) $(INTERMEDIATE_OBJ) |
d60d9f65 SS |
179 | $(RM) Makefile |
180 | ||
9255ee31 EZ |
181 | maybe-clean: |
182 | -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \ | |
183 | $(RM) $(DIST_DOCS); \ | |
184 | fi | |
d60d9f65 SS |
185 | |
186 | maintainer-clean: clean | |
9255ee31 | 187 | $(RM) $(DIST_DOCS) |
c862e87b | 188 | $(RM) $(INTERMEDIATE_OBJ) |
5bdf8622 | 189 | $(RM) $(PDFOBJ) |
d60d9f65 SS |
190 | $(RM) Makefile |
191 | ||
1b17e766 | 192 | installdirs: $(topdir)/support/mkdirs |
9255ee31 EZ |
193 | -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) |
194 | -if test -n "${htmldir}" ; then \ | |
195 | $(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(htmldir) ; \ | |
196 | fi | |
d60d9f65 | 197 | |
c862e87b | 198 | install: installdirs |
d60d9f65 | 199 | if test -f readline.info; then \ |
9255ee31 | 200 | ${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \ |
d60d9f65 | 201 | else \ |
9255ee31 | 202 | ${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \ |
d60d9f65 | 203 | fi |
1b17e766 | 204 | if test -f rluserman.info; then \ |
9255ee31 | 205 | ${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ |
1b17e766 | 206 | else \ |
9255ee31 | 207 | ${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ |
1b17e766 | 208 | fi |
d60d9f65 | 209 | if test -f history.info; then \ |
9255ee31 | 210 | ${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \ |
d60d9f65 | 211 | else \ |
9255ee31 | 212 | ${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \ |
d60d9f65 | 213 | fi |
1b17e766 | 214 | -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ |
9255ee31 EZ |
215 | install-info --dir-file=$(DESTDIR)$(infodir)/dir \ |
216 | $(DESTDIR)$(infodir)/readline.info ; \ | |
217 | install-info --dir-file=$(DESTDIR)$(infodir)/dir \ | |
218 | $(DESTDIR)$(infodir)/history.info ; \ | |
219 | install-info --dir-file=$(DESTDIR)$(infodir)/dir \ | |
220 | $(DESTDIR)$(infodir)/rluserman.info ; \ | |
d60d9f65 | 221 | else true; fi |
9255ee31 EZ |
222 | -${INSTALL_DATA} $(srcdir)/readline.3 $(DESTDIR)$(man3dir)/readline$(man3ext) |
223 | -${INSTALL_DATA} $(srcdir)/history.3 $(DESTDIR)$(man3dir)/history$(man3ext) | |
224 | -if test -n "${htmldir}" ; then \ | |
225 | if test -f readline.html; then \ | |
226 | ${INSTALL_DATA} readline.html $(DESTDIR)$(htmldir)/readline.html; \ | |
227 | else \ | |
228 | ${INSTALL_DATA} $(srcdir)/readline.html $(DESTDIR)$(htmldir)/readline.html; \ | |
229 | fi ; \ | |
230 | if test -f history.html; then \ | |
231 | ${INSTALL_DATA} history.html $(DESTDIR)$(htmldir)/history.html; \ | |
232 | else \ | |
233 | ${INSTALL_DATA} $(srcdir)/history.html $(DESTDIR)$(htmldir)/history.html; \ | |
234 | fi ; \ | |
235 | if test -f rluserman.html; then \ | |
236 | ${INSTALL_DATA} rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ | |
237 | else \ | |
238 | ${INSTALL_DATA} $(srcdir)/rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ | |
239 | fi ; \ | |
240 | fi | |
d60d9f65 SS |
241 | |
242 | uninstall: | |
9255ee31 EZ |
243 | $(RM) $(DESTDIR)$(infodir)/readline.info |
244 | $(RM) $(DESTDIR)$(infodir)/rluserman.info | |
245 | $(RM) $(DESTDIR)$(infodir)/history.info | |
246 | $(RM) $(DESTDIR)$(man3dir)/readline$(man3ext) | |
247 | $(RM) $(DESTDIR)$(man3dir)/history$(man3ext) | |
248 | -if test -n "${htmldir}" ; then \ | |
249 | $(RM) $(DESTDIR)$(htmldir)/readline.html ; \ | |
250 | $(RM) $(DESTDIR)$(htmldir)/rluserman.html ; \ | |
251 | $(RM) $(DESTDIR)$(htmldir)/history.html ; \ | |
252 | fi |