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
39 man1dir = $(mandir)/$(manpfx)$(man1ext)
41 man3dir = $(mandir)/$(manpfx)$(man3ext)
44 INSTALL_DATA = @INSTALL_DATA@
45 BUILD_DIR = @BUILD_DIR@
48 RL_LIBDIR = $(topdir)/lib/readline
55 TEXI2DVI = ${topdir}/support/texi2dvi
56 TEXI2HTML = ${topdir}/support/texi2html
57 MAN2HTML = ${BUILD_DIR}/support/man2html
58 HTMLPOST = ${srcdir}/htmlpost.sh
59 QUIETPS = #set this to -q to shut up dvips
60 PAPERSIZE = letter # change to a4 for A4-size paper
61 PSDPI = 300 # could be 600 if you like
62 DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
63 TEXINPUTDIR = $(RL_LIBDIR)/doc
65 MKDIRS = ${topdir}/support/mkdirs
67 # This should be a program that converts troff to an ascii-readable format
70 # This should be a program that converts troff to postscript
73 HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo
74 RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
76 .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html
80 -${GROFF} -man $< > $@
84 -${NROFF} -man $< > $@
88 -${MAN2HTML} $< | ${HTMLPOST} > $@
100 -${GROFF} -man $< > $@
104 -${NROFF} -man $< > $@
110 all: ps info dvi text html
111 nodvi: ps info text html
113 PSFILES = bash.ps bashbug.ps readline.ps article.ps builtins.ps rbash.ps
114 DVIFILES = bashref.dvi bashref.ps
115 INFOFILES = bashref.info
116 MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0 readline.0
117 HTMLFILES = bashref.html bash.html
125 bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
126 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
128 bashref.ps: bashref.dvi
132 bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
133 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
135 bashref.html: bashref.texi $(HSUSER) $(RLUSER)
136 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
138 new-bashref.dvi: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER)
139 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/new-bashref.texi
141 new-bashref.ps: new-bashref.dvi
143 $(DVIPS) new-bashref.dvi
145 new-bashref.info: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER)
146 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/new-bashref.texi
148 bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
149 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
157 bash.html: bash.1 $(MAN2HTML)
158 bashbug.ps: bashbug.1
159 builtins.ps: builtins.1 bash.1
160 rbash.ps: rbash.1 bash.1
163 builtins.0: builtins.1 bash.1
164 rbash.0: rbash.1 bash.1
165 readline.0: readline.3
166 readline.ps: readline.3
167 article.ps: article.ms
169 $(MAN2HTML): ${topdir}/support/man2html.c
170 -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
172 CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
176 faq.version: FAQ.version FAQ
177 sh mkfaqvers FAQ.version > $@
179 faq.headers.mail: FAQ.headers.mail FAQ
180 sh mkfaqvers FAQ.headers.mail > $@
182 faq.headers.news: FAQ.headers.news FAQ
183 sh mkfaqvers FAQ.headers.news > $@
185 faq.headers.news2: FAQ.headers.news2 FAQ
186 sh mkfaqvers FAQ.headers.news2 > $@
188 faq.news: FAQ faq.headers.news faq.version
190 cat faq.headers.news faq.version FAQ > $@
192 faq.news2: FAQ faq.headers.news2 faq.version
194 cat faq.headers.news2 faq.version FAQ > $@
196 faq.mail: FAQ faq.headers.mail faq.version
198 cat faq.headers.mail faq.version FAQ > $@
201 $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
202 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
205 distclean mostlyclean: clean
208 maintainer-clean: clean
209 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
214 -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(man1dir)
215 # uncomment the next line to create the directory for the readline man page
216 # -test -d $(man3dir) || $(SHELL) ${MKDIRS} $(man3dir)
217 -test -d $(infodir) || $(SHELL) ${MKDIRS} $(infodir)
218 -if [ -n "$(htmldir)" ]; then \
219 test -d $(htmldir) || $(SHELL) ${MKDIRS} $(htmldir) ; \
222 install: info installdirs
223 -$(INSTALL_DATA) $(srcdir)/bash.1 $(man1dir)/bash.${man1ext}
224 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(man1dir)/bashbug.${man1ext}
225 # uncomment the next line to install the readline man page
226 # -$(INSTALL_DATA) $(srcdir)/readline.3 $(man3dir)/readline.${man3ext}
227 # uncomment the next line to install the builtins man page
228 # $(INSTALL_DATA) $(srcdir)/builtins.1 $(man1dir)/bash_builtins.${man1ext}
229 -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info
230 # run install-info if it is present to update the info directory
231 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
232 install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \
234 # if htmldir is set, install the html files into that directory
235 -if [ -n "${htmldir}" ]; then \
236 $(INSTALL_DATA) $(srcdir)/bash.html $(htmldir) ; \
237 $(INSTALL_DATA) $(srcdir)/bashref.html $(htmldir) ; \
241 -$(RM) $(man1dir)/bash.${man1ext} $(man1dir)/bashbug.${man1ext}
242 -$(RM) $(man3dir)/readline.${man3ext}
243 $(RM) $(infodir)/bash.info
244 -if [ -n "$(htmldir)" ]; then \
245 $(RM) $(htmldir)/bash.html ; \
246 $(RM) $(htmldir)/bashref.html ; \
252 cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
257 cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES