DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
TEXINPUTDIR = $(RL_LIBDIR)/doc
+# These tools might not be available; they're not required
+DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
+PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
+
MKDIRS = ${topdir}/support/mkdirs
# This should be a program that converts troff to an ascii-readable format
HSUSER = $(RL_LIBDIR)/doc/hsuser.texinfo
RLUSER = $(RL_LIBDIR)/doc/rluser.texinfo
-.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html
+.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf
.1.ps:
$(RM) $@
$(RM) $@
-${MAN2HTML} $< > $@
+.ps.pdf:
+ $(RM) $@
+ -${PSPDF} $<
+
+.dvi.pdf:
+ $(RM) $@
+ -${DVIPDF} $<
+
all: ps info dvi text html
nodvi: ps info text html
INFOFILES = bashref.info
MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
HTMLFILES = bashref.html bash.html
+PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
ps: ${PSFILES}
dvi: ${DVIFILES}
info: ${INFOFILES}
text: ${MAN0FILES}
html: ${HTMLFILES}
+pdf: ${PDFFILES}
bashref.dvi: $(srcdir)/bashref.texi $(HSUSER) $(RLUSER)
TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/bashref.texi
new-bashref.info: $(srcdir)/new-bashref.texi $(HSUSER) $(RLUSER)
$(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/new-bashref.texi
-bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
- TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
-
-bashman.ps: bash.dvi
- $(RM) $@
- $(DVIPS) bash.dvi
+#bash.dvi: bash.texinfo $(HSUSER) $(RLUSER)
+# TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) bash.texinfo
+#
+#bashman.ps: bash.dvi
+# $(RM) $@
+# $(DVIPS) bash.dvi
bash.txt: bash.1
bash.ps: bash.1
rbash.0: rbash.1 bash.1
article.ps: article.ms
+article.pdf: article.ps
+bashref.pdf: bashref.dvi
+bash.pdf: bash.ps
+rose94.pdf: rose94.ps
+
$(MAN2HTML): ${topdir}/support/man2html.c
-( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
*.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
${RM} core *.core
-distclean mostlyclean: clean
+mostlyclean: clean
+ $(RM) Makefile
+
+distclean: clean maybe-clean
$(RM) Makefile
maintainer-clean: clean
${RM} ${CREATED_FAQ}
$(RM) Makefile
+maybe-clean:
+ -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
+ $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
+ fi
+
installdirs:
-test -d $(man1dir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(man1dir)
-test -d $(infodir) || $(SHELL) ${MKDIRS} $(DESTDIR)$(infodir)
posix: bashref.texi
$(SHELL) ./mkposix
- cmp -s POSIX.NOTES ../CWRU/POSIX.NOTES || mv POSIX.NOTES ../CWRU/POSIX.NOTES
- $(RM) POSIX.NOTES
+ cmp -s POSIX ../POSIX || mv POSIX ../POSIX
+ $(RM) POSIX
+
+rbash: bashref.texi
+ $(SH) ./mkrbash
+ cmp -s RBASH ../RBASH || mv RBASH ../RBASH
+ $(RM) RBASH
-xdist: inst posix
+xdist: inst posix rbash