1 # This Makefile is for the Bash/documentation directory -*- text -*-.
16 man1dir = $(mandir)/$(manpfx)$(man1ext)
18 man3dir = $(mandir)/$(manpfx)$(man3ext)
21 INSTALL_DATA = @INSTALL_DATA@
22 BUILD_DIR = @BUILD_DIR@
25 RL_LIBDIR = $(topdir)/lib/readline
32 TEXI2DVI = ${topdir}/support/texi2dvi
33 TEXI2HTML = ${topdir}/support/texi2html
34 MAN2HTML = ${BUILD_DIR}/support/man2html
35 HTMLPOST = ${srcdir}/htmlpost.sh
36 QUIETPS = #set this to -q to shut up dvips
37 DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
38 TEXINPUTDIR = $(RL_LIBDIR)/doc
40 MKDIRS = ${topdir}/support/mkdirs
42 # This should be a program that converts troff to an ascii-readable format
45 # This should be a program that converts troff to postscript
48 HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo
49 RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
51 .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html
55 -${GROFF} -man $< > $@
59 -${NROFF} -man $< > $@
63 -${MAN2HTML} $< | ${HTMLPOST} > $@
75 -${GROFF} -man $< > $@
79 -${NROFF} -man $< > $@
85 all: ps info dvi text html
86 nodvi: ps info text html
88 PSFILES = bash.ps bashbug.ps readline.ps article.ps builtins.ps
89 DVIFILES = bashref.dvi bashref.ps
90 INFOFILES = bashref.info
91 MAN0FILES = bash.0 bashbug.0 builtins.0 readline.0
92 HTMLFILES = bashref.html bash.html
100 bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
101 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
103 bashref.ps: bashref.dvi
107 bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
108 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
110 bashref.html: bashref.texi $(HSUSER) $(RLUSER)
111 $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
113 bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
114 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
122 bash.html: bash.1 $(MAN2HTML)
123 bashbug.ps: bashbug.1
124 builtins.ps: builtins.1 bash.1
127 builtins.0: builtins.1 bash.1
128 readline.0: readline.3
129 readline.ps: readline.3
130 article.ps: article.ms
132 $(MAN2HTML): ${topdir}/support/man2html.c
133 -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
135 CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
139 faq.version: FAQ.version FAQ
140 sh mkfaqvers FAQ.version > $@
142 faq.news: FAQ FAQ.headers.news faq.version
144 cat FAQ.headers.news faq.version FAQ > $@
146 faq.news2: FAQ FAQ.headers.news2 faq.version
148 cat FAQ.headers.news2 faq.version FAQ > $@
150 faq.mail: FAQ FAQ.headers.mail faq.version
152 cat FAQ.headers.mail faq.version FAQ > $@
155 $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
156 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
159 distclean mostlyclean: clean
162 maintainer-clean: clean
163 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
168 -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(man1dir)
169 # uncomment the next line to create the directory for the readline man page
170 # -test -d $(man3dir) || $(SHELL) ${MKDIRS} $(man3dir)
171 -test -d $(infodir) || $(SHELL) ${MKDIRS} $(infodir)
173 install: info installdirs
174 -$(INSTALL_DATA) $(srcdir)/bash.1 $(man1dir)/bash.${man1ext}
175 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(man1dir)/bashbug.${man1ext}
176 # uncomment the next line to install the readline man page
177 # -$(INSTALL_DATA) $(srcdir)/readline.3 $(man3dir)/readline.${man3ext}
178 # uncomment the next line to install the builtins man page
179 # $(INSTALL_DATA) $(srcdir)/builtins.1 $(man1dir)/bash_builtins.${man1ext}
180 -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info
181 # run install-info if it is present to update the info directory
182 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
183 install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \
187 -$(RM) $(man1dir)/bash.${man1ext} $(man1dir)/bashbug.${man1ext}
188 -$(RM) $(man3dir)/readline.${man3ext}
189 $(RM) $(infodir)/bash.info
194 cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
199 cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES