[PATCH 3/8] doc: install build and install info pages
David Bremner
david at tethera.net
Mon May 21 13:08:51 PDT 2018
All of the man pages are installed as info pages, plus
the (unfinished) notmuch-emacs manual
---
INSTALL | 7 +++++--
Makefile.local | 4 ++--
doc/Makefile.local | 23 +++++++++++++++++++++++
3 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/INSTALL b/INSTALL
index 056e9fac..6e6f4799 100644
--- a/INSTALL
+++ b/INSTALL
@@ -80,6 +80,9 @@ of sphinx (Jul. 2010).
Sphinx is available from www.sphinx-doc.org.
+To install the documentation as "info" pages, you will need the
+additional tools makeinfo and install-info.
+
Installing Dependencies from Packages
-------------------------------------
@@ -88,11 +91,11 @@ dependencies with a single simple command line. For example:
For Debian and similar:
- sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev zlib1g-dev python3-sphinx
+ sudo apt-get install libxapian-dev libgmime-3.0-dev libtalloc-dev zlib1g-dev python3-sphinx texinfo install-info
For Fedora and similar:
- sudo yum install xapian-core-devel gmime-devel libtalloc-devel zlib-devel python3-sphinx
+ sudo yum install xapian-core-devel gmime-devel libtalloc-devel zlib-devel python3-sphinx texinfo info
On other systems, a similar command can be used, but the details of
the package names may be different.
diff --git a/Makefile.local b/Makefile.local
index 2bf0e17a..82145e1b 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -1,7 +1,7 @@
# -*- makefile -*-
.PHONY: all
-all: notmuch notmuch-shared build-man ruby-bindings
+all: notmuch notmuch-shared build-man build-info ruby-bindings
ifeq ($(MAKECMDGOALS),)
ifeq ($(shell cat .first-build-message 2>/dev/null),)
@NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all
@@ -260,7 +260,7 @@ notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)
$(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@
.PHONY: install
-install: all install-man
+install: all install-man install-info
mkdir -p "$(DESTDIR)$(prefix)/bin/"
install notmuch-shared "$(DESTDIR)$(prefix)/bin/notmuch"
ifeq ($(MAKECMDGOALS), install)
diff --git a/doc/Makefile.local b/doc/Makefile.local
index a1739e15..16459e35 100644
--- a/doc/Makefile.local
+++ b/doc/Makefile.local
@@ -24,6 +24,12 @@ MAN_ROFF_FILES := $(MAN1_ROFF) $(MAN5_ROFF) $(MAN7_ROFF)
MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+MAN1_TEXI := $(patsubst $(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST))
+MAN5_TEXI := $(patsubst $(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST))
+MAN7_TEXI := $(patsubst $(srcdir)/doc/man7/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN7_RST))
+INFO_TEXI_FILES := $(MAN1_TEXI) $(MAN5_TEXI) $(MAN7_TEXI) $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
+INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
+
.PHONY: sphinx-html sphinx-texinfo sphinx-info
.PHONY: install-man build-man apidocs install-apidocs
@@ -98,6 +104,23 @@ install-man: ${MAN_GZIP_FILES}
cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
endif
+ifneq ($(HAVE_SPHINX)$(HAVE_MAKEINFO),11)
+build-info:
+ @echo "Missing sphinx or makeinfo, not building info pages"
+else
+build-info: sphinx-info
+endif
+
+ifneq ($(HAVE_SPHINX)$(HAVE_MAKEINFO)$(HAVE_INSTALL_INFO),111)
+install-info:
+ @echo "Missing prerequisites, not installing info pages"
+else
+install-info: build-info
+ mkdir -m0755 -p "$(DESTDIR)$(infodir)"
+ install -m0644 $(INFO_INFO_FILES) $(DESTDIR)$(infodir)
+ for file in $(INFO_INFO_FILES); do install-info $$file $(DESTDIR)$(infodir)/dir; done
+endif
+
$(dir)/config.dox: version.stamp
echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
echo "INPUT=${srcdir}/lib/notmuch.h" >> $@
--
2.17.0
More information about the notmuch
mailing list