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