[m-rev.] for review: build pdf version of the documentation

Ian MacLarty maclarty at cs.mu.OZ.AU
Sat Aug 13 15:17:07 AEST 2005


I will add links from the web site in another diff.

For review by anyone.

Estimated hours taken: 0.5
Branches: main and 0.12

Build pdf versions of the documentation and install them to the web site.

Mmake.common.in:
configure.in:
	Set PDFTEX to the location of the pdftex program.

doc/Mmakefile:
	Make and install the pdf documentation.

scripts/Mmake.vars.in:
	Set the install directory for pdf version of the documentation.

Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.82
diff -u -r1.82 Mmake.common.in
--- Mmake.common.in	6 May 2005 08:41:59 -0000	1.82
+++ Mmake.common.in	13 Aug 2005 04:08:41 -0000
@@ -209,6 +209,7 @@
 INFO=@INFO@
 TEXI2DVI=@TEXI2DVI@
 DVIPS=@DVIPS@
+PDFTEX=@PDFTEX@
 MAKEINFO=@MAKEINFO@
 LYNX=@LYNX@
 PERL=@PERL@
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.423
diff -u -r1.423 configure.in
--- configure.in	10 Aug 2005 13:58:55 -0000	1.423
+++ configure.in	13 Aug 2005 04:01:55 -0000
@@ -493,6 +493,9 @@
 esac
 AC_SUBST(TEXI2DVI)
 #-----------------------------------------------------------------------------#
+AC_PATH_PROG(PDFTEX, pdftex)
+AC_SUBST(PDFTEX)
+#-----------------------------------------------------------------------------#
 AC_PATH_PROG(LYNX,lynx)
 AC_SUBST(LYNX)
 #-----------------------------------------------------------------------------#
Index: doc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/Mmakefile,v
retrieving revision 1.38
diff -u -r1.38 Mmakefile
--- doc/Mmakefile	15 Dec 2004 06:57:35 -0000	1.38
+++ doc/Mmakefile	13 Aug 2005 04:05:55 -0000
@@ -52,6 +52,12 @@
 	endif
 endif

+ifeq ("$(PDFTEX)","")
+	PDF=warn_no_pdf
+else
+	PDF=pdf
+endif
+
 ifeq ("$(MAKEINFO)","")
 	INFOPAGES=warn_no_info
 	MDB_DOC=warn_no_mdb_doc
@@ -66,7 +72,7 @@

 #-----------------------------------------------------------------------------#

-.SUFFIXES: .in .texi_pp .texi .dvi .ps .text
+.SUFFIXES: .in .texi_pp .texi .dvi .ps .pdf .text

 %.dvi: %.texi_pp
 	$(TEXI2DVI) $< > $*.dvi_log
@@ -74,6 +80,9 @@
 %.ps: %.dvi
 	$(DVIPS) -f < $< > $@

+%.pdf: %.texi_pp
+	$(PDFTEX) $< > $*.pdf_log
+
 %.text: %.texi_pp
 	$(MAKEINFO) --no-headers -o $@ $<

@@ -106,13 +115,13 @@

 #-----------------------------------------------------------------------------#

-	# Currently `mmake all' does not build the PostScript or plain-text
-	# versions of the documentation.  Nor does it build the formatted
-	# versions of the man pages.
+	# Currently `mmake all' does not build the PostScript, PDF or
+	# plain-text versions of the documentation.  Nor does it build the
+	# formatted versions of the man pages.
 	# But it might make sense to add them.
 .PHONY: all
 all: $(INFOPAGES) $(DVI) $(HTML) manpages $(MDB_DOC)
-#all: ps text formatted_manpages
+#all: ps pdf text formatted_manpages

 #-----------------------------------------------------------------------------#

@@ -148,6 +157,14 @@
 	# Warning: Unable to build .ps files.
 	# This is probably due to a missing `dvips' or `text2dvi'

+.PHONY: pdf
+pdf: $(TEXINFO_FILES:%=%.pdf)
+
+.PHONY: warn_no_pdf
+warn_no_pdf:
+	# Warning: Unable to build .pdf files.
+	# This is probably due to a missing `pdftex'.
+
 .PHONY: text
 text: $(TEXINFO_FILES:%=%.text)

@@ -321,6 +338,7 @@
 	-[ -d $(INSTALL_DVI_DIR) ] || mkdir -p $(INSTALL_DVI_DIR)
 	-[ -d $(INSTALL_TEXT_DIR) ] || mkdir -p $(INSTALL_TEXT_DIR)
 	-[ -d $(INSTALL_PS_DIR) ] || mkdir -p $(INSTALL_PS_DIR)
+	-[ -d $(INSTALL_PDF_DIR) ] || mkdir -p $(INSTALL_PDF_DIR)
 	-[ -d $(INSTALL_MAN_DIR)/man1 ] || \
 		mkdir -p $(INSTALL_MAN_DIR)/man1
 	-[ -d $(INSTALL_MDB_DOC_DIR) ] || mkdir -p $(INSTALL_MDB_DOC_DIR)
@@ -355,6 +373,10 @@
 install_ps: $(PS) install_dirs
 	-cp *.ps $(INSTALL_PS_DIR)

+.PHONY: install_pdf
+install_pdf: $(PDF) install_dirs
+	-cp *.pdf $(INSTALL_PDF_DIR)
+
 .PHONY: install_manpages
 install_manpages: manpages install_dirs
 	cp *.1 $(INSTALL_MAN_DIR)/man1
@@ -376,8 +398,9 @@
 # INSTALL_WEBPAGE_DIR).

 .PHONY: install_webpage
-install_webpage: library-chapters.texi_pp split_html ps install_dirs
+install_webpage: library-chapters.texi_pp split_html ps pdf install_dirs
 	cp *.ps $(INSTALL_WEBPAGE_DIR)
+	cp *.pdf $(INSTALL_WEBPAGE_DIR)
 	for file in $(INSTALL_WEBPAGE_DIR)/*.ps ; do \
 		gzip -f -9 $$file ; \
 	done
@@ -402,7 +425,7 @@
 	rm -f library*.html user_guide*.html reference_manual*.html
 	rm -f faq*.html transition_guide*.html
 	rm -f mercury.html mercury.info
-	rm -f mercury_*.info* *.dvi *.text *.ps
+	rm -f mercury_*.info* *.dvi *.text *.ps *.pdf

 .PHONY: realclean_manpages
 realclean_manpages:
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.95
diff -u -r1.95 Mmake.vars.in
--- scripts/Mmake.vars.in	28 Jan 2005 07:11:58 -0000	1.95
+++ scripts/Mmake.vars.in	13 Aug 2005 04:02:41 -0000
@@ -723,6 +723,7 @@
 INSTALL_DVI_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
 INSTALL_TEXT_DIR	= $(INSTALL_PREFIX)/lib/mercury/doc
 INSTALL_PS_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
+INSTALL_PDF_DIR		= $(INSTALL_PREFIX)/lib/mercury/doc
 INSTALL_MAN_DIR		= $(INSTALL_PREFIX)/man
 INSTALL_HTML_DIR	= $(INSTALL_PREFIX)/lib/mercury/html
 INSTALL_MDB_DOC_DIR	= $(INSTALL_PREFIX)/lib/mercury/mdb

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list