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 MKDIRS = ${topdir}/support/mkdirs
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 HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo
77 RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
79 .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html
83 -${GROFF} -man $< > $@
87 -${NROFF} -man $< > $@
91 -${MAN2HTML} $< | ${HTMLPOST} > $@
103 -${GROFF} -man $< > $@
107 -${NROFF} -man $< > $@
113 all: ps info dvi text html
114 nodvi: ps info text html
116 PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
117 DVIFILES = bashref.dvi bashref.ps
118 INFOFILES = bashref.info
119 MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
120 HTMLFILES = bashref.html bash.html
128 bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
129 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
131 bashref.ps: bashref.dvi
135 bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
136 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
138 bashref.html: bashref.texi $(HSUSER) $(RLUSER)
139 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
141 new-bashref.dvi: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER)
142 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/new-bashref.texi
144 new-bashref.ps: new-bashref.dvi
146 $(DVIPS) new-bashref.dvi
148 new-bashref.info: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER)
149 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/new-bashref.texi
151 bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
152 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
160 bash.html: bash.1 $(MAN2HTML)
161 bashbug.ps: bashbug.1
162 builtins.ps: builtins.1 bash.1
163 rbash.ps: rbash.1 bash.1
166 builtins.0: builtins.1 bash.1
167 rbash.0: rbash.1 bash.1
168 article.ps: article.ms
170 $(MAN2HTML): ${topdir}/support/man2html.c
171 -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
174 $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
175 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
178 distclean mostlyclean: clean
181 maintainer-clean: clean
182 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
187 -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(man1dir)
188 -test -d $(infodir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(infodir)
189 -if test -n "$(htmldir)" ; then \
190 test -d $(htmldir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(htmldir) ; \
193 install: info installdirs
194 -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
195 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
196 # uncomment the next line to install the builtins man page
197 # -$(INSTALL_DATA) $(srcdir)/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
198 -$(INSTALL_DATA) $(srcdir)/bashref.info $(DESTDIR)$(infodir)/bash.info
199 # run install-info if it is present to update the info directory
200 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
201 install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
203 # if htmldir is set, install the html files into that directory
204 -if test -n "${htmldir}" ; then \
205 $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
206 $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
210 -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
211 $(RM) $(DESTDIR)$(infodir)/bash.info
212 -if test -n "$(htmldir)" ; then \
213 $(RM) $(DESTDIR)$(htmldir)/bash.html ; \
214 $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
218 CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
222 faq.version: FAQ.version FAQ
223 sh mkfaqvers FAQ.version > $@
225 faq.headers.mail: FAQ.headers.mail FAQ
226 sh mkfaqvers FAQ.headers.mail > $@
228 faq.headers.news: FAQ.headers.news FAQ
229 sh mkfaqvers FAQ.headers.news > $@
231 faq.headers.news2: FAQ.headers.news2 FAQ
232 sh mkfaqvers FAQ.headers.news2 > $@
234 faq.news: FAQ faq.headers.news faq.version
236 cat faq.headers.news faq.version FAQ > $@
238 faq.news2: FAQ faq.headers.news2 faq.version
240 cat faq.headers.news2 faq.version FAQ > $@
242 faq.mail: FAQ faq.headers.mail faq.version
244 cat faq.headers.mail faq.version FAQ > $@
248 cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
253 cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES