]> granicus.if.org Git - mutt/commitdiff
Build info file documentation.
authorKevin McCarthy <kevin@8t8.us>
Thu, 4 Oct 2018 19:06:27 +0000 (12:06 -0700)
committerKevin McCarthy <kevin@8t8.us>
Thu, 4 Oct 2018 19:11:51 +0000 (12:11 -0700)
If docbook2x-texi and makeinfo are installed, convert the docbook file
to info and install as another source for the manual.

.gitignore
configure.ac
doc/Makefile.am
doc/manual.xml.head

index c2b4fdcc0a40f1d5f5e46073e52b0e585e4f54cc..2cec7439c03b558cac931f99168730eeed7dbde5 100644 (file)
@@ -57,6 +57,8 @@
 /doc/pgpewrap.1
 /doc/mutt_pgpring.1
 /doc/*.html
+/doc/mutt.info
+/doc/mutt.texi
 /doc/stamp-*
 /doc/smime_keys.1
 /po/mutt.pot
index 9fac116a042602114d953e691ac9944b4ba2fb85..d8aebe336edc75f5eaad05d82b9c456a1f074bdb 100644 (file)
@@ -1572,6 +1572,15 @@ then
 fi
 AC_SUBST(DSLROOT)
 
+AC_PATH_PROG([db2x], [docbook2x-texi], [none])
+if test "$db2x" != "none"; then
+   AC_PATH_PROG([makeinfo], [makeinfo], [none])
+   if test "$makeinfo" != "none"; then
+      do_build_info=yes
+   fi
+fi
+AM_CONDITIONAL(BUILD_INFO, test x$do_build_info = xyes)
+
 AC_ARG_ENABLE(doc, AS_HELP_STRING([--disable-doc],[Do not build the documentation]),
 [       if test x$enableval = xno ; then
                 do_build_doc=no
index 4d8bef8d8b81987ecad9ec8ce45f3a39d3b0e1f2..823d1d737760544096f5a395b9869e7266c3acf3 100644 (file)
@@ -5,6 +5,10 @@ AUTOMAKE_OPTIONS = 1.6 foreign
 
 subdir = doc
 
+if BUILD_INFO
+INFO_DOCFILES = mutt.info
+endif
+
 DEFS = -DSYSCONFDIR=\"$(sysconfdir)\" -DBINDIR=\"$(bindir)\" -DHAVE_CONFIG_H=1
 AM_CPPFLAGS = -I. -I.. -I$(includedir) -I$(top_srcdir)
 
@@ -40,7 +44,7 @@ CHUNKED_DOCFILES = index.html intro.html gettingstarted.html \
 
 HTML_DOCFILES = manual.html $(CHUNKED_DOCFILES)
 
-BUILT_DISTFILES = stamp-doc-xml stamp-doc-chunked manual.txt $(HTML_DOCFILES)
+BUILT_DISTFILES = stamp-doc-xml stamp-doc-chunked manual.txt $(HTML_DOCFILES) $(INFO_DOCFILES)
 
 srcdir_DOCFILES = PGP-Notes.txt applying-patches.txt   \
        devel-notes.txt patch-notes.txt smime-notes.txt
@@ -50,7 +54,7 @@ topsrcdir_DOCFILES = COPYRIGHT GPL INSTALL ChangeLog  \
 
 all: makedoc-all
 
-makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked manual.txt pgpewrap.1 mutt_pgpring.1
+makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked manual.txt pgpewrap.1 mutt_pgpring.1 $(INFO_DOCFILES)
 
 install-data-local: makedoc-all instdoc
        $(MKDIR_P) $(DESTDIR)$(mandir)/man1
@@ -84,6 +88,11 @@ install-data-local: makedoc-all instdoc
        elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttrc ] ; then \
                $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir) ; \
        fi
+       -if [ -f mutt.info ] ; then \
+               $(MKDIR_P) $(DESTDIR)$(infodir) ; \
+               $(INSTALL) -m 644 mutt.info $(DESTDIR)$(infodir) ; \
+               install-info $(DESTDIR)$(infodir)/mutt.info $(DESTDIR)$(infodir)/dir ; \
+       fi
 
 uninstall-local:
        for f in mutt.1 mutt_dotlock.1 smime_keys.1 pgpewrap.1 mutt_pgpring.1; do \
@@ -103,6 +112,8 @@ uninstall-local:
          fi ; \
          rm $(DESTDIR)$(sysconfdir)/$${i}.dist ; \
        done
+       install-info --delete $(DESTDIR)$(infodir)/mutt.info $(DESTDIR)$(infodir)/dir
+       rm -f $(DESTDIR)$(infodir)/mutt.info
 
 check:
 manual.txt: manual.html
@@ -143,6 +154,16 @@ manual.tex: stamp-doc-xml
          openjade -t tex -D $(DSLROOT) -d print/docbook.dsl dtds/decls/xml.dcl manual.xml; \
        fi
 
+mutt.texi: stamp-doc-xml
+       docbook2x-texi --encoding=utf-8 \
+           --string-param output-file=mutt \
+           --string-param 'directory-category=Email-software' \
+           --string-param 'directory-description=Text based mail reader' \
+           manual.xml
+
+mutt.info: mutt.texi
+       makeinfo --no-split -o mutt.info mutt.texi
+
 validate: stamp-doc-xml
        xmllint --noout --noblanks --postvalid manual.xml
 
@@ -159,7 +180,7 @@ sortcheck: manual.xml
 
 clean-local:
        rm -f *~ *.html *.orig *.rej  stamp-doc-* *.ps mutt.1 smime_keys.1 muttrc.man pgpewrap.1 mutt_pgpring.1
-       rm -f *.aux *.log *.tex *.out
+       rm -f *.aux *.log *.tex *.out mutt.texi $(INFO_DOCFILES)
 
 DISTCLEANFILES=manual.txt manual.html manual.xml manual.pdf html \
               instdoc Muttrc
index bb27d8b7d0f75d139cccf96291cb8d7a599ae0ac..a068fb551e403ed622204a4dd3d7fd63bfa2b978 100644 (file)
@@ -2745,11 +2745,11 @@ specify one or the other).
 
 <para>
 <emphasis>header</emphasis> and <emphasis>body</emphasis> match
-<emphasis>regexp</emphasis> in the header/body of a message,
-<emphasis>index</emphasis> matches <emphasis>pattern</emphasis> (see
-<xref linkend="patterns"/>) in the message index.  Note that IMAP
-server-side searches (=b, =B, =h) are not supported for color index
-patterns.
+<emphasis><link linkend="regexp">regexp</link></emphasis> in the
+header/body of a message, <emphasis>index</emphasis> matches
+<emphasis><link linkend="patterns">pattern</link></emphasis> in the
+message index.  Note that IMAP server-side searches (=b, =B, =h) are
+not supported for color index patterns.
 </para>
 
 <para>