1 # This Makefile is for the Bash/documentation directory -*- text -*-.
3 # Copyright (C) 1996 Free Software Foundation, Inc.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
28 exec_prefix = @
exec_prefix@
32 # set this to a directory name to have the HTML files installed
35 # Support an alternate destination root directory for package building
42 man1dir = $(mandir)/$(manpfx
)1
44 man3dir = $(mandir)/$(manpfx
)3
47 INSTALL_DATA
= @INSTALL_DATA@
48 BUILD_DIR
= @BUILD_DIR@
51 RL_LIBDIR
= $(topdir
)/lib
/readline
58 TEXI2DVI
= ${topdir}/support
/texi2dvi
59 TEXI2HTML
= ${topdir}/support
/texi2html
60 MAN2HTML
= ${BUILD_DIR}/support
/man2html
61 HTMLPOST
= ${srcdir}/htmlpost.sh
62 QUIETPS
= #set this to -q to shut up dvips
63 PAPERSIZE
= letter
# change to a4 for A4-size paper
64 PSDPI
= 300 # could be 600 if you like
65 DVIPS
= dvips
-D
${PSDPI} $(QUIETPS
) -t
${PAPERSIZE} -o
$@
# tricky
66 TEXINPUTDIR
= $(RL_LIBDIR
)/doc
68 # These tools might not be available; they're not required
69 DVIPDF
= dvipdfm
-o
$@
-p
${PAPERSIZE}
70 PSPDF
= gs
-sPAPERSIZE
=${PAPERSIZE} -sDEVICE
=pdfwrite
-dNOPAUSE
-dBATCH
-sOutputFile
=$@
72 MKDIRS
= ${topdir}/support
/mkdirs
74 # This should be a program that converts troff to an ascii-readable format
77 # This should be a program that converts troff to postscript
80 HSUSER
= $(RL_LIBDIR
)/doc
/hsuser.texinfo
81 RLUSER
= $(RL_LIBDIR
)/doc
/rluser.texinfo
83 .SUFFIXES
: .0 .1 .3 .ms .ps .txt .
dvi .html .pdf
87 -${GROFF} -man
$< > $@
91 -${NROFF} -man
$< > $@
95 -${MAN2HTML} $< |
${HTMLPOST} > $@
103 -${NROFF} -ms
$< > $@
107 -${GROFF} -man
$< > $@
111 -${NROFF} -man
$< > $@
125 all: ps
info dvi text html
126 nodvi
: ps
info text html
128 PSFILES
= bash.ps bashbug.ps article.ps builtins.ps rbash.ps
129 DVIFILES
= bashref.
dvi bashref.ps
130 INFOFILES
= bashref.
info
131 MAN0FILES
= bash
.0 bashbug
.0 builtins
.0 rbash
.0
132 HTMLFILES
= bashref.html bash.html
133 PDFFILES
= bash.pdf bashref.pdf article.pdf rose94.pdf
142 bashref.
dvi: $(srcdir)/bashref.texi
$(HSUSER
) $(RLUSER
)
143 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/bashref.texi
145 bashref.ps
: bashref.
dvi
149 bashref.
info: $(srcdir)/bashref.texi
$(HSUSER
) $(RLUSER
)
150 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) $(srcdir)/bashref.texi
152 bashref.html
: bashref.texi
$(HSUSER
) $(RLUSER
)
153 $(TEXI2HTML
) -menu
-monolithic
-I
$(TEXINPUTDIR
) $(srcdir)/bashref.texi
155 new-bashref.
dvi: $(srcdir)/new-bashref.texi
$(HSUSER
) $(RLUSER
)
156 TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS $(TEXI2DVI
) $(srcdir)/new-bashref.texi
158 new-bashref.ps
: new-bashref.
dvi
160 $(DVIPS
) new-bashref.
dvi
162 new-bashref.
info: $(srcdir)/new-bashref.texi
$(HSUSER
) $(RLUSER
)
163 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) $(srcdir)/new-bashref.texi
165 #bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
166 # TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
168 #bashman.ps: bash.dvi
174 bash.html
: bash
.1 $(MAN2HTML
)
175 bashbug.ps
: bashbug
.1
176 builtins.ps
: builtins
.1 bash
.1
177 rbash.ps
: rbash
.1 bash
.1
180 builtins
.0: builtins
.1 bash
.1
181 rbash
.0: rbash
.1 bash
.1
182 article.ps
: article.ms
184 article.pdf
: article.ps
185 bashref.pdf
: bashref.
dvi
187 rose94.pdf
: rose94.ps
189 $(MAN2HTML
): ${topdir}/support
/man2html.c
190 -( cd
${BUILD_DIR}/support
; ${MAKE} ${MFLAGS} man2html
)
193 $(RM
) *.aux
*.bak
*.cp
*.fn
*.ky
*.log
*.pg
*.toc
*.tp
*.vr
*.cps \
194 *.pgs
*.bt
*.bts
*.rw
*.rws
*.fns
*.kys
*.tps
*.vrs
*.o
200 distclean: clean maybe-clean
203 maintainer-clean
: clean
204 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
209 -if
test "X$(topdir)" != "X$(BUILD_DIR)"; then \
210 $(RM
) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
214 -test -d
$(man1dir) ||
$(SHELL
) ${MKDIRS} $(DESTDIR
)$(man1dir)
215 -test -d
$(infodir) ||
$(SHELL
) ${MKDIRS} $(DESTDIR
)$(infodir)
216 -if
test -n
"$(htmldir)" ; then \
217 test -d
$(htmldir
) ||
$(SHELL
) ${MKDIRS} $(DESTDIR
)$(htmldir
) ; \
220 install: info installdirs
221 -$(INSTALL_DATA
) $(srcdir)/bash
.1 $(DESTDIR
)$(man1dir)/bash
${man1ext}
222 -$(INSTALL_DATA
) $(srcdir)/bashbug
.1 $(DESTDIR
)$(man1dir)/bashbug
${man1ext}
223 # uncomment the next line to install the builtins man page
224 # -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
225 -$(INSTALL_DATA
) $(srcdir)/bashref.
info $(DESTDIR
)$(infodir)/bash.
info
226 # run install-info if it is present to update the info directory
227 if
$(SHELL
) -c
'install-info --version' >/dev
/null
2>&1; then \
228 install-info
--dir-file
=$(DESTDIR
)$(infodir)/dir $(DESTDIR
)$(infodir)/bash.
info; \
230 # if htmldir is set, install the html files into that directory
231 -if
test -n
"${htmldir}" ; then \
232 $(INSTALL_DATA
) $(srcdir)/bash.html
$(DESTDIR
)$(htmldir
) ; \
233 $(INSTALL_DATA
) $(srcdir)/bashref.html
$(DESTDIR
)$(htmldir
) ; \
237 -$(RM
) $(DESTDIR
)$(man1dir)/bash
${man1ext} $(DESTDIR
)$(man1dir)/bashbug
${man1ext}
238 $(RM
) $(DESTDIR
)$(infodir)/bash.
info
239 -if
test -n
"$(htmldir)" ; then \
240 $(RM
) $(DESTDIR
)$(htmldir
)/bash.html
; \
241 $(RM
) $(DESTDIR
)$(htmldir
)/bashref.html
; \
245 CREATED_FAQ
= faq.news faq.news2 faq.mail faq.version
249 faq.version
: FAQ.version FAQ
250 sh mkfaqvers FAQ.version
> $@
252 faq.headers.mail
: FAQ.headers.mail FAQ
253 sh mkfaqvers FAQ.headers.mail
> $@
255 faq.headers.news
: FAQ.headers.news FAQ
256 sh mkfaqvers FAQ.headers.news
> $@
258 faq.headers.news2
: FAQ.headers.news2 FAQ
259 sh mkfaqvers FAQ.headers.news2
> $@
261 faq.news
: FAQ faq.headers.news faq.version
263 cat faq.headers.news faq.version FAQ
> $@
265 faq.news2
: FAQ faq.headers.news2 faq.version
267 cat faq.headers.news2 faq.version FAQ
> $@
269 faq.mail
: FAQ faq.headers.mail faq.version
271 cat faq.headers.mail faq.version FAQ
> $@
275 cmp
-s INSTALL ..
/INSTALL || mv INSTALL ..
/INSTALL
280 cmp
-s POSIX ..
/POSIX || mv POSIX ..
/POSIX
285 cmp
-s RBASH ..
/RBASH || mv RBASH ..
/RBASH
288 xdist
: inst posix rbash