1 # This Makefile is for the Bash/documentation directory -*- text -*-.
15 man1dir = $(mandir)/$(manpfx)$(man1ext)
17 man3dir = $(mandir)/$(manpfx)$(man3ext)
20 INSTALL_DATA = @INSTALL_DATA@
21 BUILD_DIR = @BUILD_DIR@
24 RL_LIBDIR = $(topdir)/lib/readline
31 TEXI2DVI = ${topdir}/support/texi2dvi
32 TEXI2HTML = ${topdir}/support/texi2html
33 MAN2HTML = ${BUILD_DIR}/support/man2html
34 HTMLPOST = ${srcdir}/htmlpost.sh
35 QUIETPS = #set this to -q to shut up dvips
36 DVIPS = dvips -D 300 $(QUIETPS) -o $@ # tricky
37 TEXINPUTDIR = $(RL_LIBDIR)/doc
39 MKDIRS = ${topdir}/support/mkdirs
41 # This should be a program that converts troff to an ascii-readable format
44 # This should be a program that converts troff to postscript
47 HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo
48 RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
50 .SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html
54 -${GROFF} -man $< > $@
58 -${NROFF} -man $< > $@
62 -${MAN2HTML} $< | ${HTMLPOST} > $@
74 -${GROFF} -man $< > $@
78 -${NROFF} -man $< > $@
84 all: ps info dvi text html
85 nodvi: ps info text html
87 ps: bash.ps bashbug.ps readline.ps article.ps builtins.ps
88 dvi: bashref.dvi bashref.ps
90 text: bash.0 bashbug.0 builtins.0 readline.0
91 html: bashref.html bash.html
93 bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
94 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
96 bashref.ps: bashref.dvi
100 bashref.info: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
101 $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi
103 bashref.html: bashref.texi $(HSUSER) $(RLUSER)
104 $(TEXI2HTML) -I $(TEXINPUTDIR) $(srcdir)/bashref.texi
106 bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
107 TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
115 bash.html: bash.1 $(MAN2HTML)
116 bashbug.ps: bashbug.1
117 builtins.ps: builtins.1 bash.1
120 builtins.0: builtins.1 bash.1
121 readline.0: readline.3
122 readline.ps: readline.3
123 article.ps: article.ms
125 $(MAN2HTML): ${topdir}/support/man2html.c
126 -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
128 faq: faq.news faq.news2 faq.mail faq.version
130 faq.version: FAQ.version FAQ
131 sh mkfaqvers FAQ.version > $@
133 faq.news: FAQ FAQ.headers.news faq.version
135 cat FAQ.headers.news faq.version FAQ > $@
137 faq.news2: FAQ FAQ.headers.news2 faq.version
139 cat FAQ.headers.news2 faq.version FAQ > $@
141 faq.mail: FAQ FAQ.headers.mail faq.version
143 cat FAQ.headers.mail faq.version FAQ > $@
146 $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
147 *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o \
148 core rluser.texinfo hsuser.texinfo
150 distclean mostlyclean: clean
153 maintainer-clean: clean
154 $(RM) *.0 *.ps *.dvi *.info *.txt
158 -test -d $(man1dir) || $(SHELL) ${MKDIRS} $(man1dir)
159 # uncomment the next line to create the directory for the readline man page
160 # -test -d $(man3dir) || $(SHELL) ${MKDIRS} $(man3dir)
161 -test -d $(infodir) || $(SHELL) ${MKDIRS} $(infodir)
163 install: info installdirs
164 -$(INSTALL_DATA) $(srcdir)/bash.1 $(man1dir)/bash.${man1ext}
165 -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(man1dir)/bashbug.${man1ext}
166 # uncomment the next line to install the readline man page
167 # -$(INSTALL_DATA) $(srcdir)/readline.3 $(man3dir)/readline.${man3ext}
168 # uncomment the next line to install the builtins man page
169 # $(INSTALL_DATA) builtins.1 $(man1dir)/bash_builtins.${man1ext}
170 -$(INSTALL_DATA) $(srcdir)/bashref.info $(infodir)/bash.info
171 # run install-info if it is present to update the info directory
172 if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
173 install-info --dir-file=$(infodir)/dir $(infodir)/bash.info; \
177 -$(RM) $(man1dir)/bash.${man1ext} $(man1dir)/bashbug.${man1ext}
178 -$(RM) $(man3dir)/readline.${man3ext}
179 $(RM) $(infodir)/bash.info
184 cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
189 cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES