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