Debian Codegraph @

build/makefiles/sphinx.am

raw
1 include $(top_srcdir)/doc/files.am
2 include $(top_srcdir)/build/makefiles/sphinx-build.am
3
4 $(html_files): html-build-stamp
5 $(html_files_relative_from_locale_dir): html-build-stamp
6
7 am__nobase_dist_doc_locale_DATA_DIST =
8 if DOCUMENT_AVAILABLE
9 doc_localedir = $(docdir)/$(LOCALE)
10 nobase_dist_doc_locale_DATA = \
11 $(html_files_relative_from_locale_dir)
12 am__nobase_dist_doc_locale_DATA_DIST += \
13 $(nobase_dist_doc_locale_DATA)
14 endif
15
16 document_source_files = \
17 $(absolute_source_files) \
18 $(absolute_theme_files) \
19 $(po_files_relative_from_locale_dir) \
20 $(mo_files_relative_from_locale_dir)
21
22 required_build_stamps = \
23 html-build-stamp \
24 mo-build-stamp
25
26 if DOCUMENT_BUILDABLE
27 EXTRA_DIST += $(required_build_stamps)
28 endif
29
30 generated_files = \
31 $(DOCTREES_BASE) \
32 html \
33 html-build-stamp \
34 text \
35 text-build-stamp \
36 markdown \
37 markdown-build-stamp
38
39 $(mo_files_relative_from_locale_dir): mo-build-stamp
40
41 mo-build-stamp: $(po_files_relative_from_locale_dir)
42 cd LC_MESSAGES && $(MAKE) build
43 @touch $@
44
45 if DOCUMENT_BUILDABLE
46 clean-local: $(clean_targets) clean-doctrees
47
48 clean-doctrees:
49 rm -rf $(DOCTREES_BASE)
50
51 maintainer-clean-local:
52 rm -rf -- $(generated_files)
53 endif
54
55 .PHONY: help
56 .PHONY: html clean-html
57 .PHONY: text clean-text
58 .PHONY: markdown clean-markdown
59
60 if DOCUMENT_BUILDABLE
61 help:
62 @echo "Please use \`make <target>' where <target> is one of"
63 @echo " html to make standalone HTML files"
64 @echo " markdown to make Markdown files (requires sphinx-markdown-builder)"
65 @echo " text to make text files"
66
67 html: html-recursive html-build-stamp
68 text: text-recursive text-build-stamp
69 markdown: markdown-recursive markdown-build-stamp
70
71 clean_targets = \
72 clean-html \
73 clean-text \
74 clean-markdown
75
76 $(clean_targets):
77 target=`echo $@ | sed -e 's/^clean-//'`; \
78 rm -rf $${target}-build-stamp $${target}
79
80 build_stamps = \
81 html-build-stamp \
82 text-build-stamp \
83 markdown-build-stamp
84
85 $(build_stamps): $(document_source_files)
86 target=`echo $@ | sed -e 's/-build-stamp$$//'`; \
87 $(SPHINX_BUILD_COMMAND) \
88 -Dlanguage=$(LOCALE) \
89 -d $(DOCTREES_BASE)/$${target} \
90 -b $${target} \
91 $(ALLSPHINXOPTS) \
92 $${target}
93 @touch $@
94 endif