unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
blob a13cb37316643ee160d2743ea604bc32b79793b1 3389 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
 
# -*- makefile -*-

dir := doc

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

prerst2man := python $(srcdir)/$(dir)/prerst2man.py
mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py

# Internal variables.
ALLSPHINXOPTS   := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(srcdir)/$(dir)
APIMAN		:= $(DOCBUILDDIR)/man/man3/notmuch.3
DOXYFILE	:= $(srcdir)/$(dir)/doxygen.cfg

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

.PHONY: install-man build-man apidocs install-apidocs

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

sphinx-html:
	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(DOCBUILDDIR)/html

sphinx-texinfo:
	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo

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

-include $(dir)/docdeps.mk

MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})

# 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}
ifeq ($(HAVE_SPHINX),1)
	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man
	for section in 1 5 7; do \
	    mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
	    mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
	done
else ifeq ($(HAVE_RST2MAN),1)
	$(prerst2man) "$(RST2MAN)" $(srcdir)/doc $(DOCBUILDDIR)/man
else
	@echo "Fatal: build dependency fail."
	@false
endif
	touch ${MAN_ROFF_FILES} $@

install-man: install-apidocs

ifeq ($(HAVE_DOXYGEN),1)
MAN_GZIP_FILES += ${APIMAN}.gz
apidocs: $(APIMAN)
install-apidocs: apidocs
	mkdir -p "$(DESTDIR)$(mandir)/man3"
	install -m0644  $(DOCBUILDDIR)/man/man3/*.3.gz  $(DESTDIR)/$(mandir)/man3

$(APIMAN): $(dir)/config.dox $(srcdir)/$(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
	mkdir -p $(DOCBUILDDIR)/man/man3
	doxygen $(DOXYFILE)
	rm -f $(DOCBUILDDIR)/man/man3/_*.3
	perl -pi -e 's/^[.]RI "\\fI/.RI "\\fP/' $(APIMAN)
else
apidocs:
install-apidocs:
endif

# Do not try to build or install man pages if a man page converter is
# not available.
ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)
build-man:
install-man:
	@echo "No sphinx or rst2man, will not install man pages."
else
build-man: ${MAN_GZIP_FILES}
install-man: ${MAN_GZIP_FILES}
	mkdir -p "$(DESTDIR)$(mandir)/man1"
	mkdir -p "$(DESTDIR)$(mandir)/man5"
	mkdir -p "$(DESTDIR)$(mandir)/man7"
	install -m0644 $(DOCBUILDDIR)/man/man1/*.1.gz $(DESTDIR)/$(mandir)/man1
	install -m0644 $(DOCBUILDDIR)/man/man5/*.5.gz $(DESTDIR)/$(mandir)/man5
	install -m0644 $(DOCBUILDDIR)/man/man7/*.7.gz $(DESTDIR)/$(mandir)/man7
	cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
endif

$(dir)/config.dox: version.stamp
	echo "PROJECT_NAME = \"Notmuch $(VERSION)\"" > $@
	echo "INPUT=${srcdir}/lib/notmuch.h" >> $@

$(dir)/docdeps.mk: $(dir)/conf.py $(dir)/mkdocdeps.py
	$(mkdocdeps) $(srcdir)/doc $(DOCBUILDDIR) $@

CLEAN := $(CLEAN) $(DOCBUILDDIR) $(dir)/docdeps.mk $(DOCBUILDDIR)/.roff.stamp
CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox

debug log:

solving a13cb3731664 ...
found a13cb3731664 in https://yhetil.org/notmuch/1420294479-27224-1-git-send-email-tomi.ollila@iki.fi/
found e7d0bac8f3fb in https://yhetil.org/notmuch.git/
preparing index
index prepared:
100644 e7d0bac8f3fbb3914a17bc209dc5dd077a0d3e15	doc/Makefile.local

applying [1/1] https://yhetil.org/notmuch/1420294479-27224-1-git-send-email-tomi.ollila@iki.fi/
diff --git a/doc/Makefile.local b/doc/Makefile.local
index e7d0bac8f3fb..a13cb3731664 100644

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

index at:
100644 a13cb37316643ee160d2743ea604bc32b79793b1	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).