1 # This makefile for Readline library documentation is in -*- text -*- mode.
2 # Emacs likes it that way.
4 # Copyright (C) 1996 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.
31 man1dir = $(mandir)/$(manpfx
)1
33 man3dir = $(mandir)/$(manpfx
)3
35 # set this to a value to have the HTML documentation installed
38 # Support an alternate destination root directory for package building
45 INSTALL_DATA
= @INSTALL_DATA@
47 BUILD_DIR
= @BUILD_DIR@
48 TEXINPUTDIR
= $(srcdir)
50 MAKEINFO
= LANGUAGE
= makeinfo
51 TEXI2DVI
= $(srcdir)/texi2dvi
52 TEXI2HTML
= $(srcdir)/texi2html
53 QUIETPS
= #set this to -q to shut up dvips
55 PSDPI
= 300 # I don't have any 600-dpi printers
56 DVIPS
= dvips
-D
${PSDPI} $(QUIETPS
) -t
${PAPERSIZE} -o
$@
# tricky
58 RLSRC
= $(srcdir)/rlman.texinfo
$(srcdir)/rluser.texinfo \
59 $(srcdir)/rltech.texinfo
$(srcdir)/manvers.texinfo \
60 $(srcdir)/rluserman.texinfo
61 HISTSRC
= $(srcdir)/hist.texinfo
$(srcdir)/hsuser.texinfo \
62 $(srcdir)/hstech.texinfo
$(srcdir)/manvers.texinfo
64 # This should be a program that converts troff to an ascii-readable format
67 # This should be a program that converts troff to postscript
70 DVIOBJ
= readline.
dvi history.
dvi rluserman.
dvi
71 INFOOBJ
= readline.
info history.
info rluserman.
info
72 PSOBJ
= readline.ps history.ps rluserman.ps readline_3.ps history_3.ps
73 HTMLOBJ
= readline.html history.html rluserman.html
74 TEXTOBJ
= readline
.0 history
.0
76 INTERMEDIATE_OBJ
= rlman.
dvi hist.
dvi rluserman.
dvi
78 DIST_DOCS
= $(DVIOBJ
) $(PSOBJ
) $(HTMLOBJ
) $(INFOOBJ
) $(TEXTOBJ
)
80 .SUFFIXES
: .0 .3 .ps .txt .
dvi
84 -${NROFF} -man
$< > $@
86 all: info dvi html ps text
89 readline.
dvi: $(RLSRC
)
90 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/rlman.texinfo
91 mv rlman.
dvi readline.
dvi
93 readline.
info: $(RLSRC
)
94 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) -o
$@
$(srcdir)/rlman.texinfo
96 rluserman.
dvi: $(RLSRC
)
97 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/rluserman.texinfo
99 rluserman.
info: $(RLSRC
)
100 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) -o
$@
$(srcdir)/rluserman.texinfo
102 history.
dvi: ${HISTSRC}
103 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/hist.texinfo
104 mv hist.
dvi history.
dvi
106 history.
info: ${HISTSRC}
107 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) -o
$@
$(srcdir)/hist.texinfo
109 readline.ps
: readline.
dvi
111 $(DVIPS
) readline.
dvi
113 rluserman.ps
: rluserman.
dvi
115 $(DVIPS
) rluserman.
dvi
117 history.ps
: history.
dvi
122 # This leaves readline.html and rlman.html -- rlman.html is for www.gnu.org
124 readline.html
: ${RLSRC}
125 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/rlman.texinfo
126 sed
-e
's:rlman.html:readline.html:g' rlman.html
> readline.html
128 rluserman.html
: ${RLSRC}
129 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/rluserman.texinfo
131 history.html
: ${HISTSRC}
132 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/hist.texinfo
133 sed
-e
's:hist.html:history.html:g' hist.html
> history.html
142 readline
.0: readline
.3
144 readline_3.ps
: readline
.3
146 ${GROFF} -man
< $(srcdir)/readline
.3 > $@
150 history_3.ps
: history
.3
152 ${GROFF} -man
< $(srcdir)/history
.3 > $@
155 $(RM
) *.aux
*.cp
*.fn
*.ky
*.log
*.pg
*.toc
*.tp
*.vr
*.cps
*.pgs \
156 *.fns
*.kys
*.tps
*.vrs
*.bt
*.bts
*.o core
*.core
160 distclean: clean maybe-clean
161 $(RM
) $(INTERMEDIATE_OBJ
)
165 -if
test "X$(topdir)" != "X$(BUILD_DIR)"; then \
166 $(RM
) $(DIST_DOCS
); \
169 maintainer-clean
: clean
171 $(RM
) $(INTERMEDIATE_OBJ
)
174 installdirs: $(topdir
)/support
/mkdirs
175 -$(SHELL
) $(topdir
)/support
/mkdirs
$(DESTDIR
)$(infodir) $(DESTDIR
)$(man3dir)
176 -if
test -n
"${htmldir}" ; then \
177 $(SHELL
) $(topdir
)/support
/mkdirs
$(DESTDIR
)$(htmldir
) ; \
181 if
test -f readline.
info; then \
182 ${INSTALL_DATA} readline.
info $(DESTDIR
)$(infodir)/readline.
info; \
184 ${INSTALL_DATA} $(srcdir)/readline.
info $(DESTDIR
)$(infodir)/readline.
info; \
186 if
test -f rluserman.
info; then \
187 ${INSTALL_DATA} rluserman.
info $(DESTDIR
)$(infodir)/rluserman.
info; \
189 ${INSTALL_DATA} $(srcdir)/rluserman.
info $(DESTDIR
)$(infodir)/rluserman.
info; \
191 if
test -f history.
info; then \
192 ${INSTALL_DATA} history.
info $(DESTDIR
)$(infodir)/history.
info; \
194 ${INSTALL_DATA} $(srcdir)/history.
info $(DESTDIR
)$(infodir)/history.
info; \
196 -if
$(SHELL
) -c
'install-info --version' >/dev
/null
2>&1; then \
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 ; \
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
; \
210 ${INSTALL_DATA} $(srcdir)/readline.html
$(DESTDIR
)$(htmldir
)/readline.html
; \
212 if
test -f history.html
; then \
213 ${INSTALL_DATA} history.html
$(DESTDIR
)$(htmldir
)/history.html
; \
215 ${INSTALL_DATA} $(srcdir)/history.html
$(DESTDIR
)$(htmldir
)/history.html
; \
217 if
test -f rluserman.html
; then \
218 ${INSTALL_DATA} rluserman.html
$(DESTDIR
)$(htmldir
)/rluserman.html
; \
220 ${INSTALL_DATA} $(srcdir)/rluserman.html
$(DESTDIR
)$(htmldir
)/rluserman.html
; \
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
; \