1 # This makefile for Readline library documentation is in -*- text -*- mode.
2 # Emacs likes it that way.
4 # Copyright (C) 1996-2004 Free Software Foundation, Inc.
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)
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.
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.
26 datarootdir = @datarootdir@
34 man1dir = $(mandir)/$(manpfx)1
36 man3dir = $(mandir)/$(manpfx)3
38 # set this to a value to have the HTML documentation installed
41 # Support an alternate destination root directory for package building
48 INSTALL_DATA = @INSTALL_DATA@
50 BUILD_DIR = @BUILD_DIR@
51 TEXINPUTDIR = $(srcdir)
53 MAKEINFO = LANGUAGE= makeinfo
54 TEXI2DVI = $(srcdir)/texi2dvi
55 TEXI2HTML = $(srcdir)/texi2html
56 QUIETPS = #set this to -q to shut up dvips
59 DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
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=$@
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
71 # This should be a program that converts troff to an ascii-readable format
74 # This should be a program that converts troff to postscript
77 DVIOBJ = readline.dvi history.dvi rluserman.dvi
78 INFOOBJ = readline.info history.info rluserman.info
79 PSOBJ = readline.ps history.ps rluserman.ps readline_3.ps history_3.ps
80 HTMLOBJ = readline.html history.html rluserman.html
81 TEXTOBJ = readline.0 history.0
82 PDFOBJ = readline.pdf history.pdf rluserman.pdf
84 INTERMEDIATE_OBJ = rlman.dvi
86 DIST_DOCS = $(DVIOBJ) $(PSOBJ) $(HTMLOBJ) $(INFOOBJ) $(TEXTOBJ)
88 .SUFFIXES: .0 .3 .ps .txt .dvi .html .pdf
92 -${NROFF} -man $< > $@
102 all: info dvi html ps text
103 nodvi: info html text
112 readline.dvi: $(RLSRC)
113 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi
114 mv rlman.dvi readline.dvi
116 readline.info: $(RLSRC)
117 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi
119 rluserman.dvi: $(RLSRC)
120 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi
122 rluserman.info: $(RLSRC)
123 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi
125 history.dvi: ${HISTSRC}
126 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi
128 history.info: ${HISTSRC}
129 $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi
131 readline.ps: readline.dvi
133 $(DVIPS) readline.dvi
135 rluserman.ps: rluserman.dvi
137 $(DVIPS) rluserman.dvi
139 history.ps: history.dvi
144 # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org
146 readline.html: ${RLSRC}
147 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi
148 sed -e 's:rlman.html:readline.html:g' rlman.html > readline.html
151 rluserman.html: ${RLSRC}
152 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi
154 history.html: ${HISTSRC}
155 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi
157 readline.0: readline.3
159 readline_3.ps: readline.3
161 ${GROFF} -man < $(srcdir)/readline.3 > $@
165 history_3.ps: history.3
167 ${GROFF} -man < $(srcdir)/history.3 > $@
169 readline.pdf: readline.dvi
170 history.pdf: history.dvi
171 rluserman.pdf: rluserman.dvi
174 $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
175 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o \
180 distclean: clean maybe-clean
181 $(RM) $(INTERMEDIATE_OBJ)
185 -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
186 $(RM) $(DIST_DOCS); \
189 maintainer-clean: clean
191 $(RM) $(INTERMEDIATE_OBJ)
195 installdirs: $(topdir)/support/mkdirs
196 -$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(infodir) $(DESTDIR)$(man3dir)
197 -if test -n "${htmldir}" ; then \
198 $(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(htmldir) ; \
202 if test -f readline.info; then \
203 ${INSTALL_DATA} readline.info $(DESTDIR)$(infodir)/readline.info; \
205 ${INSTALL_DATA} $(srcdir)/readline.info $(DESTDIR)$(infodir)/readline.info; \
207 if test -f rluserman.info; then \
208 ${INSTALL_DATA} rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \
210 ${INSTALL_DATA} $(srcdir)/rluserman.info $(DESTDIR)$(infodir)/rluserman.info; \
212 if test -f history.info; then \
213 ${INSTALL_DATA} history.info $(DESTDIR)$(infodir)/history.info; \
215 ${INSTALL_DATA} $(srcdir)/history.info $(DESTDIR)$(infodir)/history.info; \
217 -if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
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 ; \
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; \
231 ${INSTALL_DATA} $(srcdir)/readline.html $(DESTDIR)$(htmldir)/readline.html; \
233 if test -f history.html; then \
234 ${INSTALL_DATA} history.html $(DESTDIR)$(htmldir)/history.html; \
236 ${INSTALL_DATA} $(srcdir)/history.html $(DESTDIR)$(htmldir)/history.html; \
238 if test -f rluserman.html; then \
239 ${INSTALL_DATA} rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \
241 ${INSTALL_DATA} $(srcdir)/rluserman.html $(DESTDIR)$(htmldir)/rluserman.html; \
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 ; \