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