for review: support `install-info'

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 11 07:49:08 AEDT 1999


Anyone care to review this one?

--------------------

Estimated hours taken: 2

Add support for `install-info' and related TexInfo innovations.

configure.in:
	Check for the `install-info' command.

doc/Mmakefile:
	If we have `install-info', use it to install the entry
	for mercury.info file in the .../info/dir file.

doc/mercury.info:
	Add *INFO-DIR* commands, so that `install-info' works properly.

doc/*.texi:
	Add @direntry and @dircategory commands, so that
	`install-info' works properly.
	(The initial version of this patch was provided by
	Marko Schuetz <marko at ki.informatik.uni-frankfurt.de>.)
	This replaces the old technique of hard-coding the *INFO-DIR*
	info commands, inside `@ifinfo'.
	Note that currently the Mmakefile does not actually invoke
	install-info on all the info files; currently it only does that
	for the menu file mercury.info, since it seems more polite to
	just add a single entry in the top-level directory rather than
	one for every single piece of Mercury-related documentation.
	The change here to *.texi is just in case we should ever
	decide to reverse that policy decision, or in case any other
	tools that process info files start to make use of the
	@direntry or @dircategory commands.

doc/texinfo.tex:
	Update to the version from GNU texinfo 3.12, so that it
	supports the @direntry and @dircategory commands.

Index: configure.in
===================================================================
RCS file: /home/staff/zs/imp/mercury/configure.in,v
retrieving revision 1.148
diff -u -r1.148 configure.in
--- configure.in	1999/02/01 02:02:26	1.148
+++ configure.in	1999/02/10 18:50:12
@@ -218,6 +218,9 @@
 fi
 AC_SUBST(MKTEMP)
 #-----------------------------------------------------------------------------#
+AC_PATH_PROG(INSTALL_INFO,install-info)
+AC_SUBST(INSTALL_INFO)
+#-----------------------------------------------------------------------------#
 AC_PROG_CC
 AC_SUBST(CC)
 
Index: doc/faq.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/faq.texi,v
retrieving revision 1.20
diff -u -r1.20 faq.texi
--- faq.texi	1997/08/20 07:43:00	1.20
+++ faq.texi	1999/02/10 20:30:21
@@ -1,16 +1,10 @@
 \input texinfo
 @setfilename mercury_faq.info
 @settitle The Mercury FAQ list
-
- at ignore
- at ifinfo
- at format
-START-INFO-DIR-ENTRY
-* Mercury FAQ: (mercury_faq).      The Mercury Frequently Asked Questions list
-END-INFO-DIR-ENTRY
- at end format
- at end ifinfo
- at end ignore
+ at dircategory The Mercury Programming Language
+ at direntry
+* Mercury FAQ: (mercury_faq). The Mercury Frequently Asked Questions list.
+ at end direntry
 
 @c failed attempt to control spacing
 @c @tex
Index: doc/library.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/library.texi,v
retrieving revision 1.13
diff -u -r1.13 library.texi
--- library.texi	1997/08/20 07:43:01	1.13
+++ library.texi	1999/02/10 20:30:26
@@ -1,16 +1,10 @@
 \input texinfo
 @setfilename mercury_library.info
 @settitle The Mercury Library Reference Manual
-
- at c @ignore
- at ifinfo
- at format
-START-INFO-DIR-ENTRY
-* Mercury Library: (mercury_library). The Mercury Library Reference Manual
-END-INFO-DIR-ENTRY
- at end format
- at end ifinfo
- at c @end ignore
+ at dircategory The Mercury Programming Language
+ at direntry
+* Mercury Library: (mercury_library).  The Mercury Library Reference Manual.
+ at end direntry
 
 @c @smallbook
 @c @cropmarks
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/reference_manual.texi,v
retrieving revision 1.120
diff -u -r1.120 reference_manual.texi
--- reference_manual.texi	1999/02/08 22:42:51	1.120
+++ reference_manual.texi	1999/02/10 20:30:32
@@ -1,16 +1,10 @@
 \input texinfo
 @setfilename mercury_ref.info
 @settitle The Mercury Language Reference Manual
-
- at c @ignore
- at ifinfo
- at format
-START-INFO-DIR-ENTRY
-* Mercury: (mercury_ref).        The Mercury Language Reference Manual
-END-INFO-DIR-ENTRY
- at end format
- at end ifinfo
- at c @end ignore
+ at dircategory The Mercury Programming Language
+ at direntry
+* Mercury Language: (mercury_ref).  The Mercury Language Reference Manual.
+ at end direntry
 
 @c Uncomment the line below to enable documentation of the Aditi interface.
 @c @set aditi
Index: doc/transition_guide.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/transition_guide.texi,v
retrieving revision 1.25
diff -u -r1.25 transition_guide.texi
--- transition_guide.texi	1999/02/01 00:56:28	1.25
+++ transition_guide.texi	1999/02/10 20:30:53
@@ -1,16 +1,10 @@
 \input texinfo
 @setfilename mercury_trans_guide.info
 @settitle The Prolog to Mercury transition guide
-
- at ignore
- at ifinfo
- at format
-START-INFO-DIR-ENTRY
-* Mercury: (mercury).                The Prolog to Mercury transition guide
-END-INFO-DIR-ENTRY
- at end format
- at end ifinfo
- at end ignore
+ at dircategory The Mercury Programming Language
+ at direntry
+* Mercury Transition Guide: (mercury_trans_guide). The Prolog to Mercury Transition Guide.
+ at end direntry
 
 @c @smallbook
 @c @cropmarks
Index: doc/user_guide.texi
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/user_guide.texi,v
retrieving revision 1.156
diff -u -r1.156 user_guide.texi
--- user_guide.texi	1999/01/31 11:51:46	1.156
+++ user_guide.texi	1999/02/10 20:31:04
@@ -1,16 +1,10 @@
 \input texinfo
 @setfilename mercury_user_guide.info
 @settitle The Mercury User's Guide
-
- at ignore
- at ifinfo
- at format
-START-INFO-DIR-ENTRY
-* Mercury: (mercury).                The Mercury User's Guide.
-END-INFO-DIR-ENTRY
- at end format
- at end ifinfo
- at end ignore
+ at dircategory The Mercury Programming Language
+ at direntry
+* Mercury User's Guide: (mercury_user_guide).  The Mercury User's Guide.
+ at end direntry
 
 @c Uncomment the line below to enable documentation of the Aditi interface.
 @c @set aditi
Index: doc/Mmakefile
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/Mmakefile,v
retrieving revision 1.14
diff -u -r1.14 Mmakefile
--- Mmakefile	1998/10/19 14:39:35	1.14
+++ Mmakefile	1999/02/10 20:13:36
@@ -19,6 +19,8 @@
 TEXI2HTML_SPLIT=perl texi2html -split
 DVIPS=dvips
 
+# INSTALL_INFO is defined in ../Mmake.common
+
 #-----------------------------------------------------------------------------#
 
 .SUFFIXES: .texi .dvi .ps .text
@@ -173,7 +175,11 @@
 .PHONY: install_info
 install_info: info
 	-[ -d $(INSTALL_INFO_DIR) ] || mkdir -p $(INSTALL_INFO_DIR)
-	cp *.info* $(INSTALL_INFO_DIR)
+	-cp *.info* $(INSTALL_INFO_DIR)
+	# Update the .../info/dir file.
+	-if [ -x "$(INSTALL_INFO)" ]; then				\
+		$(INSTALL_INFO) $(INSTALL_INFO_DIR)/mercury.info;	\
+	fi
 
 .PHONY: install_html
 install_html: html
Index: doc/mercury.info
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/mercury.info,v
retrieving revision 1.7
diff -u -r1.7 mercury.info
--- mercury.info	1999/02/10 18:40:29	1.7
+++ mercury.info	1999/02/10 20:11:40
@@ -1,4 +1,9 @@
 
+INFO-DIR-SECTION Development
+START-INFO-DIR-ENTRY
+* Mercury: (mercury).                The Mercury Programming Language.
+END-INFO-DIR-ENTRY
+
 
 File: mercury.info,  Node: Top,  Up: (DIR)
 
Index: doc/texinfo.tex
===================================================================
RCS file: /home/staff/zs/imp/mercury/doc/texinfo.tex,v
retrieving revision 1.1
diff -u -r1.1 texinfo.tex
--- texinfo.tex	1995/02/28 22:43:34	1.1
+++ texinfo.tex	1999/02/10 18:13:37
[... the diff for texinfo.tex deleted, since it's not very relevant ...]

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list