* Makefile.tpl (RANLIB): Define.
[deliverable/binutils-gdb.git] / readline / doc / Makefile.in
CommitLineData
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
20topdir = @top_srcdir@
d60d9f65
SS
21srcdir = @srcdir@
22VPATH = .:@srcdir@
23
24prefix = @prefix@
25infodir = @infodir@
26
27mandir = @mandir@
1b17e766
EZ
28manpfx = man
29
9255ee31
EZ
30man1ext = .1
31man1dir = $(mandir)/$(manpfx)1
32man3ext = .3
33man3dir = $(mandir)/$(manpfx)3
34
35# set this to a value to have the HTML documentation installed
36htmldir =
37
38# Support an alternate destination root directory for package building
39DESTDIR =
d60d9f65 40
c862e87b 41SHELL = @MAKE_SHELL@
d60d9f65
SS
42RM = rm -f
43
1b17e766
EZ
44INSTALL = @INSTALL@
45INSTALL_DATA = @INSTALL_DATA@
46
47BUILD_DIR = @BUILD_DIR@
d60d9f65
SS
48TEXINPUTDIR = $(srcdir)
49
1b17e766 50MAKEINFO = LANGUAGE= makeinfo
d60d9f65
SS
51TEXI2DVI = $(srcdir)/texi2dvi
52TEXI2HTML = $(srcdir)/texi2html
53QUIETPS = #set this to -q to shut up dvips
1b17e766
EZ
54PAPERSIZE = letter
55PSDPI = 300 # I don't have any 600-dpi printers
56DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
d60d9f65
SS
57
58RLSRC = $(srcdir)/rlman.texinfo $(srcdir)/rluser.texinfo \
1b17e766
EZ
59 $(srcdir)/rltech.texinfo $(srcdir)/manvers.texinfo \
60 $(srcdir)/rluserman.texinfo
d60d9f65 61HISTSRC = $(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
65NROFF = groff -Tascii
66
67# This should be a program that converts troff to postscript
68GROFF = groff
69
1b17e766
EZ
70DVIOBJ = readline.dvi history.dvi rluserman.dvi
71INFOOBJ = readline.info history.info rluserman.info
9255ee31 72PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps
1b17e766 73HTMLOBJ = readline.html history.html rluserman.html
9255ee31 74TEXTOBJ = readline.0 history.0
d60d9f65 75
1b17e766 76INTERMEDIATE_OBJ = rlman.dvi hist.dvi rluserman.dvi
c862e87b 77
9255ee31 78DIST_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
86all: info dvi html ps text
87nodvi: info html text
88
89readline.dvi: $(RLSRC)
90 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texinfo
91 mv rlman.dvi readline.dvi
92
93readline.info: $(RLSRC)
94 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texinfo
95
1b17e766
EZ
96rluserman.dvi: $(RLSRC)
97 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texinfo
98
99rluserman.info: $(RLSRC)
100 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texinfo
101
d60d9f65
SS
102history.dvi: ${HISTSRC}
103 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/hist.texinfo
104 mv hist.dvi history.dvi
105
106history.info: ${HISTSRC}
107 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/hist.texinfo
108
109readline.ps: readline.dvi
110 $(RM) $@
111 $(DVIPS) readline.dvi
112
1b17e766
EZ
113rluserman.ps: rluserman.dvi
114 $(RM) $@
115 $(DVIPS) rluserman.dvi
116
d60d9f65
SS
117history.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 124readline.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
128rluserman.html: ${RLSRC}
129 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texinfo
130
d60d9f65 131history.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
136info: $(INFOOBJ)
137dvi: $(DVIOBJ)
138ps: $(PSOBJ)
139html: $(HTMLOBJ)
140text: $(TEXTOBJ)
141
142readline.0: readline.3
143
9255ee31
EZ
144readline_3.ps: readline.3
145 ${RM} $@
146 ${GROFF} -man < $(srcdir)/readline.3 > $@
147
148history.0: history.3
149
150history_3.ps: history.3
151 ${RM} $@
152 ${GROFF} -man < $(srcdir)/history.3 > $@
153
d60d9f65
SS
154clean:
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
158mostlyclean: clean
d60d9f65 159
9255ee31 160distclean: clean maybe-clean
c862e87b 161 $(RM) $(INTERMEDIATE_OBJ)
d60d9f65
SS
162 $(RM) Makefile
163
9255ee31
EZ
164maybe-clean:
165 -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
166 $(RM) $(DIST_DOCS); \
167 fi
d60d9f65
SS
168
169maintainer-clean: clean
9255ee31 170 $(RM) $(DIST_DOCS)
c862e87b 171 $(RM) $(INTERMEDIATE_OBJ)
d60d9f65
SS
172 $(RM) Makefile
173
1b17e766 174installdirs: $(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 180install: 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
224uninstall:
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
This page took 0.177209 seconds and 4 git commands to generate.