doc: install build and install info pages

All of the man pages are installed as info pages, plus
the (unfinished) notmuch-emacs manual
This commit is contained in:
David Bremner 2018-05-21 13:08:51 -07:00
parent 7e3575c0ca
commit 7a6d4a0852
3 changed files with 30 additions and 4 deletions

View file

@ -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.

View file

@ -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)

View file

@ -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" >> $@