mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-22 19:08:09 +01:00
d6cbb24fcf
To describe the script and config file format, so folks don't have to dig through NEWS or the script's source to get that information. The Makefile and conf.py are excerpted from the main doc/ directory with minor simplifications and adjustments. The devel/nmbug/ scripts are largely independent of notmuch, and separating the docs here allows packagers to easily build the docs and install the scripts in a separate package, without complicating notmuch's core build/install process.
38 lines
1.2 KiB
Makefile
38 lines
1.2 KiB
Makefile
# Makefile for Sphinx documentation
|
|
#
|
|
|
|
# You can set these variables from the command line.
|
|
SPHINXOPTS =
|
|
SPHINXBUILD = sphinx-build
|
|
DOCBUILDDIR := _build
|
|
|
|
SRCDIR ?= .
|
|
ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(SRCDIR)
|
|
|
|
MAN_RST_FILES := $(shell find $(SRCDIR)/man* -name '*.rst')
|
|
MAN_ROFF_FILES := $(patsubst $(SRCDIR)/man%.rst,$(DOCBUILDDIR)/man/man%,$(MAN_RST_FILES))
|
|
MAN_GZIP_FILES := $(addsuffix .gz,$(MAN_ROFF_FILES))
|
|
|
|
.PHONY: build-man
|
|
build-man: $(MAN_GZIP_FILES)
|
|
|
|
%.gz: %
|
|
rm -f $@ && gzip --stdout $^ > $@
|
|
|
|
$(MAN_ROFF_FILES): $(DOCBUILDDIR)/.roff.stamp
|
|
|
|
# By using $(DOCBUILDDIR)/.roff.stamp instead of $(MAN_ROFF_FILES), we
|
|
# convey to make that a single invocation of this recipe builds all
|
|
# of the roff files. This prevents parallel make from starting an
|
|
# instance of this recipe for each roff file.
|
|
$(DOCBUILDDIR)/.roff.stamp $(MAN_ROFF_FILES): $(MAN_RST_FILES)
|
|
mkdir -p $(DOCBUILDDIR)
|
|
touch $(DOCBUILDDIR)/.roff.stamp
|
|
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
|
|
for section in 1 5; do \
|
|
mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
|
|
mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
|
|
done
|
|
|
|
clean:
|
|
rm -rf $(DOCBUILDDIR) $(SRCDIR)/conf.pyc
|