1 # This makefile for Readline library documentation is in -*- text -*- mode.
2 # Emacs likes it that way.
4 # Copyright (C) 1996-2009 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 3 of the License, or
9 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
25 datarootdir
= @datarootdir@
33 man1dir = $(mandir)/$(manpfx
)1
35 man3dir = $(mandir)/$(manpfx
)3
37 # set this to a value to have the HTML documentation installed
40 # Support an alternate destination root directory for package building
47 INSTALL_DATA
= @INSTALL_DATA@
49 BUILD_DIR
= @BUILD_DIR@
50 TEXINPUTDIR
= $(srcdir)
52 MAKEINFO
= LANGUAGE
= makeinfo
53 TEXI2DVI
= $(srcdir)/texi2dvi
54 TEXI2HTML
= $(srcdir)/texi2html
55 QUIETPS
= #set this to -q to shut up dvips
58 DVIPS
= dvips
-D
${PSDPI} $(QUIETPS
) -t
${PAPERSIZE} -o
$@
# tricky
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
=$@
64 RLSRC
= $(srcdir)/rlman.texi
$(srcdir)/rluser.texi \
65 $(srcdir)/rltech.texi
$(srcdir)/version.texi \
66 $(srcdir)/rluserman.texi
$(srcdir)/fdl.texi
67 HISTSRC
= $(srcdir)/history.texi
$(srcdir)/hsuser.texi \
68 $(srcdir)/hstech.texi
$(srcdir)/version.texi
$(srcdir)/fdl.texi
70 # This should be a program that converts troff to an ascii-readable format
73 # This should be a program that converts troff to postscript
76 DVIOBJ
= readline.
dvi history.
dvi rluserman.
dvi
77 INFOOBJ
= readline.
info history.
info rluserman.
info
78 PSOBJ
= readline.ps history.ps rluserman.ps readline_3.ps history_3.ps
79 HTMLOBJ
= readline.html history.html rluserman.html
80 TEXTOBJ
= readline
.0 history
.0
81 PDFOBJ
= readline.pdf history.pdf rluserman.pdf
83 INTERMEDIATE_OBJ
= rlman.
dvi
85 DIST_DOCS
= $(DVIOBJ
) $(PSOBJ
) $(HTMLOBJ
) $(INFOOBJ
) $(TEXTOBJ
) $(PDFOBJ
)
87 .SUFFIXES
: .0 .3 .ps .txt .
dvi .html .pdf
91 -${NROFF} -man
$< > $@
101 all: info dvi html ps text pdf
102 nodvi
: info html text
113 readline.
dvi: $(RLSRC
)
114 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/rlman.texi
115 mv rlman.
dvi readline.
dvi
117 readline.
info: $(RLSRC
)
118 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) -o
$@
$(srcdir)/rlman.texi
120 rluserman.
dvi: $(RLSRC
)
121 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/rluserman.texi
123 rluserman.
info: $(RLSRC
)
124 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) -o
$@
$(srcdir)/rluserman.texi
126 history.
dvi: ${HISTSRC}
127 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/history.texi
129 history.
info: ${HISTSRC}
130 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) -o
$@
$(srcdir)/history.texi
132 readline.ps
: readline.
dvi
134 $(DVIPS
) readline.
dvi
136 rluserman.ps
: rluserman.
dvi
138 $(DVIPS
) rluserman.
dvi
140 history.ps
: history.
dvi
145 # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org
147 readline.html
: ${RLSRC}
148 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/rlman.texi
149 sed
-e
's:rlman.html:readline.html:g' rlman.html
> readline.html
152 rluserman.html
: ${RLSRC}
153 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/rluserman.texi
155 history.html
: ${HISTSRC}
156 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/history.texi
158 readline
.0: readline
.3
160 readline_3.ps
: $(srcdir)/readline
.3
162 ${GROFF} -man
< $(srcdir)/readline
.3 > $@
166 history_3.ps
: $(srcdir)/history
.3
168 ${GROFF} -man
< $(srcdir)/history
.3 > $@
170 readline.pdf
: readline.
dvi
171 history.pdf
: history.
dvi
172 rluserman.pdf
: rluserman.
dvi
175 $(RM
) *.aux
*.bak
*.cp
*.fn
*.ky
*.log
*.pg
*.toc
*.tp
*.vr
*.cps \
176 *.pgs
*.bt
*.bts
*.rw
*.rws
*.fns
*.kys
*.tps
*.vrs
*.o \
181 distclean: clean maybe-clean
182 $(RM
) $(INTERMEDIATE_OBJ
)
186 -if
test "X$(topdir)" != "X.." && test "X$(topdir)" != "X$(BUILD_DIR)"; then \
187 $(RM
) $(DIST_DOCS
); \
190 maintainer-clean
: clean
192 $(RM
) $(INTERMEDIATE_OBJ
)
196 installdirs: $(topdir
)/support
/mkdirs
197 -$(SHELL
) $(topdir
)/support
/mkdirs
$(DESTDIR
)$(infodir) $(DESTDIR
)$(man3dir)
198 -if
test -n
"${htmldir}" ; then \
199 $(SHELL
) $(topdir
)/support
/mkdirs
$(DESTDIR
)$(htmldir
) ; \
203 if
test -f readline.
info; then \
204 ${INSTALL_DATA} readline.
info $(DESTDIR
)$(infodir)/readline.
info; \
206 ${INSTALL_DATA} $(srcdir)/readline.
info $(DESTDIR
)$(infodir)/readline.
info; \
208 if
test -f rluserman.
info; then \
209 ${INSTALL_DATA} rluserman.
info $(DESTDIR
)$(infodir)/rluserman.
info; \
211 ${INSTALL_DATA} $(srcdir)/rluserman.
info $(DESTDIR
)$(infodir)/rluserman.
info; \
213 if
test -f history.
info; then \
214 ${INSTALL_DATA} history.
info $(DESTDIR
)$(infodir)/history.
info; \
216 ${INSTALL_DATA} $(srcdir)/history.
info $(DESTDIR
)$(infodir)/history.
info; \
218 -if
$(SHELL
) -c
'install-info --version' >/dev
/null
2>&1; then \
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 ; \
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
; \
232 ${INSTALL_DATA} $(srcdir)/readline.html
$(DESTDIR
)$(htmldir
)/readline.html
; \
234 if
test -f history.html
; then \
235 ${INSTALL_DATA} history.html
$(DESTDIR
)$(htmldir
)/history.html
; \
237 ${INSTALL_DATA} $(srcdir)/history.html
$(DESTDIR
)$(htmldir
)/history.html
; \
239 if
test -f rluserman.html
; then \
240 ${INSTALL_DATA} rluserman.html
$(DESTDIR
)$(htmldir
)/rluserman.html
; \
242 ${INSTALL_DATA} $(srcdir)/rluserman.html
$(DESTDIR
)$(htmldir
)/rluserman.html
; \
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
; \