1 # This Makefile is for the Bush/documentation directory -*- text -*-.
3 # Copyright (C) 2003-2015 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 3 of the License, or
8 # (at your option) any later version.
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, see <http://www.gnu.org/licenses/>.
18 PACKAGE
= @PACKAGE_NAME@
19 VERSION
= @PACKAGE_VERSION@
21 PACKAGE_BUGREPORT
= @PACKAGE_BUGREPORT@
22 PACKAGE_NAME
= @PACKAGE_NAME@
23 PACKAGE_STRING
= @PACKAGE_STRING@
24 PACKAGE_VERSION
= @PACKAGE_VERSION@
26 PACKAGE_TARNAME
= @PACKAGE_TARNAME@
37 exec_prefix = @
exec_prefix@
39 datarootdir
= @datarootdir@
45 # set this to a directory name to have the HTML files installed
48 # Support an alternate destination root directory for package building
55 man1dir = $(mandir)/$(manpfx
)1
57 man3dir = $(mandir)/$(manpfx
)3
60 INSTALL_DATA
= @INSTALL_DATA@
61 BUILD_DIR
= @BUILD_DIR@
63 SUPPORT_SRCDIR
= $(topdir
)/support
66 RL_LIBDIR
= $(topdir
)/lib
/readline
73 TEXI2DVI
= ${SUPPORT_SRCDIR}/texi2dvi
74 TEXI2HTML
= ${SUPPORT_SRCDIR}/texi2html
75 MAN2HTML
= ${BUILD_DIR}/support
/man2html
76 HTMLPOST
= ${srcdir}/htmlpost.sh
77 INFOPOST
= ${srcdir}/infopost.sh
78 QUIETPS
= #set this to -q to shut up dvips
79 PAPERSIZE
= letter
# change to a4 for A4-size paper
80 PSDPI
= 600 # could be 300 if you like
81 DVIPS
= dvips
-D
${PSDPI} $(QUIETPS
) -t
${PAPERSIZE} -o
$@
# tricky
82 # experimental; uses external texi2dvi for now; this needs pdftex to be present
83 TEXI2PDF
= texi2dvi --pdf
85 TEXINPUTDIR
= $(RL_LIBDIR
)/doc
86 SET_TEXINPUTS
= TEXINPUTS
=.
:$(TEXINPUTDIR
):$$TEXINPUTS
88 # These tools might not be available; they're not required
89 DVIPDF
= dvipdfm
-o
$@
-p
${PAPERSIZE}
90 PSPDF
= gs
-sPAPERSIZE
=${PAPERSIZE} -sDEVICE
=pdfwrite
-dNOPAUSE
-dBATCH
-sOutputFile
=$@
92 MKDIRS
= ${SUPPORT_SRCDIR}/mkdirs
94 # This should be a program that converts troff to an ascii-readable format
95 # added the -P -c for benefit of Mac OS X, which insists on adding colors if
97 NROFF
= groff
-Tascii
-P
-c
99 # This should be a program that converts troff to postscript
102 HSUSER
= $(RL_LIBDIR
)/doc
/hsuser.texi
103 RLUSER
= $(RL_LIBDIR
)/doc
/rluser.texi
105 BUSHREF_FILES
= $(srcdir)/bushref.texi
$(srcdir)/fdl.texi
$(srcdir)/version.texi
107 .SUFFIXES
: .0 .1 .3 .ms .ps .txt .
dvi .html .pdf
111 -${GROFF} -man
$< > $@
115 -${NROFF} -man
$< > $@
119 -${MAN2HTML} $< |
${HTMLPOST} > $@
123 -${GROFF} -ms
$< > $@
127 -${NROFF} -ms
$< > $@
131 -${GROFF} -man
$< > $@
135 -${NROFF} -man
$< > $@
157 all: ps
info dvi text html
$(MAN2HTML
)
158 nodvi
: ps
info text html
161 PSFILES
= bush.ps bushbug.ps article.ps builtins.ps rbush.ps
162 DVIFILES
= bushref.
dvi bushref.ps
163 INFOFILES
= bushref.
info bush.
info
164 MAN0FILES
= bush
.0 bushbug
.0 builtins
.0 rbush
.0
165 HTMLFILES
= bushref.html bush.html
166 PDFFILES
= bush.pdf bushref.pdf article.pdf rose94.pdf
175 bushref.
dvi: $(BUSHREF_FILES
) $(HSUSER
) $(RLUSER
)
176 ${SET_TEXINPUTS} $(TEXI2DVI
) $(srcdir)/bushref.texi ||
{ ${RM} $@
; exit
1; }
178 bushref.
info: $(BUSHREF_FILES
) $(HSUSER
) $(RLUSER
)
179 $(MAKEINFO
) --no-split
-I
$(TEXINPUTDIR
) $(srcdir)/bushref.texi
182 bushref.pdf
: $(BUSHREF_FILES
) $(HSUSER
) $(RLUSER
)
183 ${SET_TEXINPUTS} $(TEXI2PDF
) $(srcdir)/bushref.texi ||
{ ${RM} $@
; exit
1; }
187 # $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bushref.texi
188 bushref.html
: $(BUSHREF_FILES
) $(HSUSER
) $(RLUSER
)
189 $(MAKEINFO
) --html
--no-split
-I
$(TEXINPUTDIR
) $(srcdir)/bushref.texi
191 bush.
info: bushref.
info
192 ${SHELL} ${INFOPOST} < $(srcdir)/bushref.
info > $@
; \
197 bushbug.ps
: bushbug
.1
198 builtins.ps
: builtins
.1 bush
.1
199 rbush.ps
: rbush
.1 bush
.1
202 builtins
.0: builtins
.1 bush
.1
203 rbush
.0: rbush
.1 bush
.1
204 article.ps
: article.ms
206 bushref.ps
: bushref.
dvi
208 article.pdf
: article.ps
209 #bushref.pdf: bushref.dvi
211 bushref.pdf
: bushref.texi
213 rose94.pdf
: rose94.ps
215 OTHER_DOCS
= $(srcdir)/FAQ
$(srcdir)/INTRO
216 OTHER_INSTALLED_DOCS
= FAQ INTRO
218 $(MAN2HTML
): ${topdir}/support
/man2html.c
219 -( cd
${BUILD_DIR}/support
; ${MAKE} ${MFLAGS} man2html
)
222 $(RM
) *.aux
*.bak
*.cp
*.fn
*.ky
*.log
*.pg
*.toc
*.tp
*.vr
*.cps \
223 *.pgs
*.bt
*.bts
*.rw
*.rws
*.fns
*.kys
*.tps
*.vrs
*.o
229 distclean: clean maybe-clean
232 maintainer-clean
: clean
233 ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
238 -if
test "X$(topdir)" != "X$(BUILD_DIR)"; then \
239 $(RM
) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
243 -$(SHELL
) $(SUPPORT_SRCDIR
)/mkinstalldirs
$(DESTDIR
)$(man1dir)
244 -$(SHELL
) $(SUPPORT_SRCDIR
)/mkinstalldirs
$(DESTDIR
)$(infodir)
245 -$(SHELL
) $(SUPPORT_SRCDIR
)/mkinstalldirs
$(DESTDIR
)$(docdir
)
246 -if
test -n
"$(htmldir)" ; then \
247 $(SHELL
) $(SUPPORT_SRCDIR
)/mkinstalldirs
$(DESTDIR
)$(htmldir
) ; \
250 install: info installdirs
251 -$(INSTALL_DATA
) $(srcdir)/bush
.1 $(DESTDIR
)$(man1dir)/bush
${man1ext}
252 -$(INSTALL_DATA
) $(srcdir)/bushbug
.1 $(DESTDIR
)$(man1dir)/bushbug
${man1ext}
253 -$(INSTALL_DATA
) $(OTHER_DOCS
) $(DESTDIR
)$(docdir
)
254 # uncomment the next lines to install the builtins man page
255 # sed 's:bush\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
256 # -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bush_builtins${man1ext}
257 # -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
258 -if
test -f bush.
info; then d
=.
; else d
=$(srcdir); fi
; \
259 $(INSTALL_DATA
) $$d/bush.
info $(DESTDIR
)$(infodir)/bush.
info
260 # run install-info if it is present to update the info directory
261 if
$(SHELL
) -c
'install-info --version' >/dev
/null
2>&1; then \
262 install-info
--dir-file
=$(DESTDIR
)$(infodir)/dir $(DESTDIR
)$(infodir)/bush.
info; \
264 # if htmldir is set, install the html files into that directory
265 -if
test -n
"${htmldir}" ; then \
266 $(INSTALL_DATA
) $(srcdir)/bush.html
$(DESTDIR
)$(htmldir
) ; \
267 $(INSTALL_DATA
) $(srcdir)/bushref.html
$(DESTDIR
)$(htmldir
) ; \
270 install_builtins
: installdirs
271 sed
's:bush\.1:man1/&:' $(srcdir)/builtins
.1 > $${TMPDIR
:-/var
/tmp
}/builtins
.1
272 -$(INSTALL_DATA
) $${TMPDIR
:-/var
/tmp
}/builtins
.1 $(DESTDIR
)$(man1dir)/bush_builtins
${man1ext}
273 -$(RM
) $${TMPDIR
:-/var
/tmp
}/builtins
.1
275 install_everything
: install install_builtins
278 -if
test -n
"${htmldir}" ; then \
279 $(INSTALL_DATA
) $(srcdir)/bush.html
$(DESTDIR
)$(htmldir
) ; \
280 $(INSTALL_DATA
) $(srcdir)/bushref.html
$(DESTDIR
)$(htmldir
) ; \
284 -$(RM
) $(DESTDIR
)$(man1dir)/bush
${man1ext} $(DESTDIR
)$(man1dir)/bushbug
${man1ext}
285 -$(RM
) $(DESTDIR
)$(man1dir)/bush_builtins
${man1ext}
286 $(RM
) $(DESTDIR
)$(infodir)/bush.
info
287 # run install-info if it is present to update the info directory
288 if
$(SHELL
) -c
'install-info --version' >/dev
/null
2>&1; then \
289 install-info
--delete
--dir-file
=$(DESTDIR
)$(infodir)/dir $(DESTDIR
)$(infodir)/bush.
info; \
291 -( cd
$(DESTDIR
)$(docdir
) && $(RM
) $(OTHER_INSTALLED_DOCS
) )
292 -if
test -n
"$(htmldir)" ; then \
293 $(RM
) $(DESTDIR
)$(htmldir
)/bush.html
; \
294 $(RM
) $(DESTDIR
)$(htmldir
)/bushref.html
; \
298 CREATED_FAQ
= faq.news faq.news2 faq.mail faq.version
302 faq.version
: FAQ.version FAQ
303 sh mkfaqvers FAQ.version
> $@
305 faq.headers.mail
: FAQ.headers.mail FAQ
306 sh mkfaqvers FAQ.headers.mail
> $@
308 faq.headers.news
: FAQ.headers.news FAQ
309 sh mkfaqvers FAQ.headers.news
> $@
311 faq.headers.news2
: FAQ.headers.news2 FAQ
312 sh mkfaqvers FAQ.headers.news2
> $@
314 faq.news
: FAQ faq.headers.news faq.version
316 cat faq.headers.news faq.version FAQ
> $@
318 faq.news2
: FAQ faq.headers.news2 faq.version
320 cat faq.headers.news2 faq.version FAQ
> $@
322 faq.mail
: FAQ faq.headers.mail faq.version
324 cat faq.headers.mail faq.version FAQ
> $@
328 cmp
-s INSTALL ..
/INSTALL || mv INSTALL ..
/INSTALL
333 cmp
-s POSIX ..
/POSIX || mv POSIX ..
/POSIX
338 cmp
-s RBUSH ..
/RBUSH || mv RBUSH ..
/RBUSH
341 xdist
: everything inst posix rbush