Commit | Line | Data |
---|---|---|
d60d9f65 SS |
1 | # This makefile for Readline library documentation is in -*- text -*- mode. |
2 | # Emacs likes it that way. | |
1b17e766 EZ |
3 | |
4 | # Copyright (C) 1996 Free Software Foundation, Inc. | |
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 EZ |
54 | PAPERSIZE = letter |
55 | PSDPI = 300 # I don't have any 600-dpi printers | |
56 | DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky | |
d60d9f65 SS |
57 | |
58 | RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \ | |
1b17e766 EZ |
59 | $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \ |
60 | $(srcdir)/rluserman.texinfo | |
d60d9f65 | 61 | HISTSRC = $(srcdir)/hist.texinfo $(srcdir)/hsuser.texinfo \ |
c862e87b | 62 | $(srcdir)/hstech.texinfo $(srcdir)/manvers.texinfo |
d60d9f65 SS |
63 | |
64 | # This should be a program that converts troff to an ascii-readable format | |
65 | NROFF = groff -Tascii | |
66 | ||
67 | # This should be a program that converts troff to postscript | |
68 | GROFF = groff | |
69 | ||
1b17e766 EZ |
70 | DVIOBJ = readline.dvi history.dvi rluserman.dvi |
71 | INFOOBJ = readline.info history.info rluserman.info | |
9255ee31 | 72 | PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps |
1b17e766 | 73 | HTMLOBJ = readline.html history.html rluserman.html |
9255ee31 | 74 | TEXTOBJ = readline.0 history.0 |
d60d9f65 | 75 | |
1b17e766 | 76 | INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi |
c862e87b | 77 | |
9255ee31 | 78 | DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ) |
d60d9f65 SS |
79 | |
80 | .SUFFIXES: .0 .3 .ps .txt .dvi | |
81 | ||
82 | .3.0: | |
83 | $(RM) $@ | |
84 | -${NROFF} -man $< > $@ | |
85 | ||
86 | all: info dvi html ps text | |
87 | nodvi: info html text | |
88 | ||
89 | readline.dvi: $(RLSRC) | |
90 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo | |
91 | mv rlman.dvi readline.dvi | |
92 | ||
93 | readline.info: $(RLSRC) | |
94 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo | |
95 | ||
1b17e766 EZ |
96 | rluserman.dvi: $(RLSRC) |
97 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo | |
98 | ||
99 | rluserman.info: $(RLSRC) | |
100 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo | |
101 | ||
d60d9f65 SS |
102 | history.dvi: ${HISTSRC} |
103 | TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo | |
104 | mv hist.dvi history.dvi | |
105 | ||
106 | history.info: ${HISTSRC} | |
107 | $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo | |
108 | ||
109 | readline.ps: readline.dvi | |
110 | $(RM) $@ | |
111 | $(DVIPS) readline.dvi | |
112 | ||
1b17e766 EZ |
113 | rluserman.ps: rluserman.dvi |
114 | $(RM) $@ | |
115 | $(DVIPS) rluserman.dvi | |
116 | ||
d60d9f65 SS |
117 | history.ps: history.dvi |
118 | $(RM) $@ | |
119 | $(DVIPS) history.dvi | |
120 | ||
9255ee31 EZ |
121 | # |
122 | # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org | |
123 | # | |
d60d9f65 | 124 | readline.html: ${RLSRC} |
c862e87b | 125 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texinfo |
1b17e766 | 126 | sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html |
d60d9f65 | 127 | |
1b17e766 EZ |
128 | rluserman.html: ${RLSRC} |
129 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo | |
130 | ||
d60d9f65 | 131 | history.html: ${HISTSRC} |
c862e87b | 132 | $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/hist.texinfo |
1b17e766 | 133 | sed -e 's:hist.html:history.html:g' hist.html > history.html |
c862e87b | 134 | $(RM) hist.html |
d60d9f65 SS |
135 | |
136 | info: $(INFOOBJ) | |
137 | dvi: $(DVIOBJ) | |
138 | ps: $(PSOBJ) | |
139 | html: $(HTMLOBJ) | |
140 | text: $(TEXTOBJ) | |
141 | ||
142 | readline.0: readline.3 | |
143 | ||
9255ee31 EZ |
144 | readline_3.ps: readline.3 |
145 | ${RM} $@ | |
146 | ${GROFF} -man < $(srcdir)/readline.3 > $@ | |
147 | ||
148 | history.0: history.3 | |
149 | ||
150 | history_3.ps: history.3 | |
151 | ${RM} $@ | |
152 | ${GROFF} -man < $(srcdir)/history.3 > $@ | |
153 | ||
d60d9f65 SS |
154 | clean: |
155 | $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \ | |
9255ee31 EZ |
156 | *.fns *.kys *.tps *.vrs *.bt *.bts *.o core *.core |
157 | ||
158 | mostlyclean: clean | |
d60d9f65 | 159 | |
9255ee31 | 160 | distclean: clean maybe-clean |
c862e87b | 161 | $(RM) $(INTERMEDIATE_OBJ) |
d60d9f65 SS |
162 | $(RM) Makefile |
163 | ||
9255ee31 EZ |
164 | maybe-clean: |
165 | -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \ | |
166 | $(RM) $(DIST_DOCS); \ | |
167 | fi | |
d60d9f65 SS |
168 | |
169 | maintainer-clean: clean | |
9255ee31 | 170 | $(RM) $(DIST_DOCS) |
c862e87b | 171 | $(RM) $(INTERMEDIATE_OBJ) |
d60d9f65 SS |
172 | $(RM) Makefile |
173 | ||
1b17e766 | 174 | installdirs: $(topdir)/support/mkdirs |
9255ee31 EZ |
175 | -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) |
176 | -if test -n "${htmldir}" ; then \ | |
177 | $(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(htmldir) ; \ | |
178 | fi | |
d60d9f65 | 179 | |
c862e87b | 180 | install: installdirs |
d60d9f65 | 181 | if test -f readline.info; then \ |
9255ee31 | 182 | ${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \ |
d60d9f65 | 183 | else \ |
9255ee31 | 184 | ${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \ |
d60d9f65 | 185 | fi |
1b17e766 | 186 | if test -f rluserman.info; then \ |
9255ee31 | 187 | ${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ |
1b17e766 | 188 | else \ |
9255ee31 | 189 | ${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \ |
1b17e766 | 190 | fi |
d60d9f65 | 191 | if test -f history.info; then \ |
9255ee31 | 192 | ${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \ |
d60d9f65 | 193 | else \ |
9255ee31 | 194 | ${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \ |
d60d9f65 | 195 | fi |
1b17e766 | 196 | -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ |
9255ee31 EZ |
197 | install-info --dir-file=$(DESTDIR)$(infodir)/dir \ |
198 | $(DESTDIR)$(infodir)/readline.info ; \ | |
199 | install-info --dir-file=$(DESTDIR)$(infodir)/dir \ | |
200 | $(DESTDIR)$(infodir)/history.info ; \ | |
201 | install-info --dir-file=$(DESTDIR)$(infodir)/dir \ | |
202 | $(DESTDIR)$(infodir)/rluserman.info ; \ | |
d60d9f65 | 203 | else true; fi |
9255ee31 EZ |
204 | -${INSTALL_DATA} $(srcdir)/readline.3 $(DESTDIR)$(man3dir)/readline$(man3ext) |
205 | -${INSTALL_DATA} $(srcdir)/history.3 $(DESTDIR)$(man3dir)/history$(man3ext) | |
206 | -if test -n "${htmldir}" ; then \ | |
207 | if test -f readline.html; then \ | |
208 | ${INSTALL_DATA} readline.html $(DESTDIR)$(htmldir)/readline.html; \ | |
209 | else \ | |
210 | ${INSTALL_DATA} $(srcdir)/readline.html $(DESTDIR)$(htmldir)/readline.html; \ | |
211 | fi ; \ | |
212 | if test -f history.html; then \ | |
213 | ${INSTALL_DATA} history.html $(DESTDIR)$(htmldir)/history.html; \ | |
214 | else \ | |
215 | ${INSTALL_DATA} $(srcdir)/history.html $(DESTDIR)$(htmldir)/history.html; \ | |
216 | fi ; \ | |
217 | if test -f rluserman.html; then \ | |
218 | ${INSTALL_DATA} rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ | |
219 | else \ | |
220 | ${INSTALL_DATA} $(srcdir)/rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \ | |
221 | fi ; \ | |
222 | fi | |
d60d9f65 SS |
223 | |
224 | uninstall: | |
9255ee31 EZ |
225 | $(RM) $(DESTDIR)$(infodir)/readline.info |
226 | $(RM) $(DESTDIR)$(infodir)/rluserman.info | |
227 | $(RM) $(DESTDIR)$(infodir)/history.info | |
228 | $(RM) $(DESTDIR)$(man3dir)/readline$(man3ext) | |
229 | $(RM) $(DESTDIR)$(man3dir)/history$(man3ext) | |
230 | -if test -n "${htmldir}" ; then \ | |
231 | $(RM) $(DESTDIR)$(htmldir)/readline.html ; \ | |
232 | $(RM) $(DESTDIR)$(htmldir)/rluserman.html ; \ | |
233 | $(RM) $(DESTDIR)$(htmldir)/history.html ; \ | |
234 | fi |