unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob 10281a82efffdf186df61a036a71c49dc3363fcf 4794 bytes (raw)
name: doc/Makefile.local 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
 
# -*- makefile-gmake -*-

dir := doc

# You can set these variables from the command line.
SPHINXOPTS    := -q
SPHINXBUILD   = sphinx-build
DOCBUILDDIR      := $(dir)/_build

# Internal variables.
ALLSPHINXOPTS   := $(SPHINXOPTS) $(srcdir)/$(dir)

MAN1_RST := $(wildcard $(srcdir)/doc/man1/*.rst)
ifeq ($(WITH_API_DOCS),1)
	MAN3_RST := $(wildcard $(srcdir)/doc/man3/*.rst)
else
	MAN3_RST :=
endif
MAN5_RST := $(wildcard $(srcdir)/doc/man5/*.rst)
MAN7_RST := $(wildcard $(srcdir)/doc/man7/*.rst)
MAN_RST_FILES := $(MAN1_RST) $(MAN3_RST) $(MAN5_RST) $(MAN7_RST)
ALL_RST_FILES := $(MAN_RST_FILES) $(srcdir)/doc/notmuch-emacs.rst

MAN1_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN1_RST:.rst=.1))
MAN3_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN3_RST:.rst=.3))
MAN5_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN5_RST:.rst=.5))
MAN7_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN7_RST:.rst=.7))
MAN_ROFF_FILES := $(MAN1_ROFF) $(MAN3_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))
MAN3_TEXI := $(patsubst $(srcdir)/doc/man3/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN3_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) $(MAN3_TEXI) $(MAN5_TEXI) $(MAN7_TEXI)
ifeq ($(WITH_EMACS),1)
	INFO_TEXI_FILES += $(DOCBUILDDIR)/texinfo/notmuch-emacs.texi
endif

INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)

.PHONY: sphinx-html sphinx-texinfo sphinx-info

.PHONY: install-man build-man

%.gz: %
	rm -f $@ && gzip --no-name --stdout $^ > $@

ifeq ($(WITH_EMACS),1)
$(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.html.stamp $(DOCBUILDDIR)/.texi.stamp : docstring.stamp
endif

sphinx-html: $(DOCBUILDDIR)/.html.stamp

$(DOCBUILDDIR)/.html.stamp: $(ALL_RST_FILES) lib/notmuch.h
	$(SPHINXBUILD) -b html -d $(DOCBUILDDIR)/html_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html
	touch $@

sphinx-texinfo: $(DOCBUILDDIR)/.texi.stamp

$(DOCBUILDDIR)/.texi.stamp: $(ALL_RST_FILES) lib/notmuch.h
	$(SPHINXBUILD) -b texinfo -d $(DOCBUILDDIR)/texinfo_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo
	touch $@

sphinx-info: sphinx-texinfo
	$(MAKE) -C $(DOCBUILDDIR)/texinfo info

# Use the man page converter that is available. We should never depend
# on MAN_ROFF_FILES if a converter is not available.
${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_RST_FILES} lib/notmuch.h
ifeq ($(HAVE_SPHINX),1)
	$(SPHINXBUILD) -b man -d $(DOCBUILDDIR)/man_doctrees $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
	for section in 1 3 5 7; do \
	    mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
	    mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
	done
else
	@echo "Fatal: build dependency fail."
	@false
endif
	touch $@

# Do not try to build or install man pages if a man page converter is
# not available.
ifeq ($(HAVE_SPHINX),0)
build-man:
install-man:
	@echo "No sphinx, will not install man pages."
else
build-man: ${MAN_GZIP_FILES}
install-man: ${MAN_GZIP_FILES}
	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man1"
	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man5"
	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man7"
	install -m0644 $(filter %.1.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man1
	install -m0644 $(filter %.5.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man5
	install -m0644 $(filter %.7.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man7
	cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
ifeq ($(WITH_API_DOCS),1)
	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man3"
	install -m0644 $(filter %.3.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man3
endif
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

CLEAN := $(CLEAN) $(DOCBUILDDIR) $(DOCBUILDDIR)/.roff.stamp $(DOCBUILDDIR)/.texi.stamp
CLEAN := $(CLEAN) $(DOCBUILDDIR)/.html.stamp
CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc

debug log:

solving 10281a82efff ...
found 10281a82efff in https://yhetil.org/notmuch/20211012185127.198348-2-jani@nikula.org/
found f476d1da46c9 in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100644 f476d1da46c990e3b2a6bc45a4cb3e5097b9aa09	doc/Makefile.local

applying [1/1] https://yhetil.org/notmuch/20211012185127.198348-2-jani@nikula.org/
diff --git a/doc/Makefile.local b/doc/Makefile.local
index f476d1da46c9..10281a82efff 100644

Checking patch doc/Makefile.local...
Applied patch doc/Makefile.local cleanly.

index at:
100644 10281a82efffdf186df61a036a71c49dc3363fcf	doc/Makefile.local

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).