2018-03-06 14:54:44 +08:00
|
|
|
# Minimal makefile for Sphinx documentation
|
|
|
|
#
|
|
|
|
|
2018-03-09 07:59:55 +08:00
|
|
|
ifeq ($(VERBOSE),1)
|
|
|
|
Q =
|
|
|
|
else
|
|
|
|
Q = @
|
|
|
|
endif
|
|
|
|
|
2018-03-06 14:54:44 +08:00
|
|
|
# You can set these variables from the command line.
|
2018-03-09 07:59:55 +08:00
|
|
|
SPHINXOPTS = -q
|
2018-03-06 14:54:44 +08:00
|
|
|
SPHINXBUILD = sphinx-build
|
|
|
|
SPHINXPROJ = "Project ACRN"
|
|
|
|
SOURCEDIR = .
|
|
|
|
BUILDDIR = _build
|
|
|
|
|
2018-03-07 07:12:49 +08:00
|
|
|
PUBLISHDIR = ../projectacrn.github.io
|
|
|
|
|
2018-03-06 14:54:44 +08:00
|
|
|
# Put it first so that "make" without argument is like "make help".
|
|
|
|
help:
|
|
|
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
|
|
|
|
|
|
.PHONY: help Makefile
|
|
|
|
|
2018-03-07 07:12:49 +08:00
|
|
|
pullsource:
|
2018-03-09 07:59:55 +08:00
|
|
|
scripts/pullsource.sh
|
2018-03-07 07:12:49 +08:00
|
|
|
|
|
|
|
|
2018-03-07 04:26:59 +08:00
|
|
|
# Generate the doxygen xml (for Sphinx) and copy the doxygen html to the
|
|
|
|
# api folder for publishing along with the Sphinx-generated API docs.
|
|
|
|
|
2018-03-07 07:12:49 +08:00
|
|
|
doxy: pullsource
|
|
|
|
$(Q)(cat acrn.doxyfile) | doxygen - 2>&1
|
2018-03-06 14:54:44 +08:00
|
|
|
|
2018-03-07 07:12:49 +08:00
|
|
|
# Remove generated content (Sphinx and doxygen)
|
2018-03-06 14:54:44 +08:00
|
|
|
|
|
|
|
clean:
|
2018-03-09 07:59:55 +08:00
|
|
|
rm -fr $(BUILDDIR) doxygen
|
2018-03-07 07:12:49 +08:00
|
|
|
|
|
|
|
# Copy material over to the GitHub pages staging repo
|
2018-03-09 07:59:55 +08:00
|
|
|
# along with a README
|
2018-03-07 07:12:49 +08:00
|
|
|
|
|
|
|
publish:
|
2018-03-09 07:59:55 +08:00
|
|
|
rm -fr $(PUBLISHDIR)/*
|
|
|
|
cp -r $(BUILDDIR)/html/* $(PUBLISHDIR)
|
|
|
|
cp scripts/publish-README.md $(PUBLISHDIR)/README.md
|
2018-03-11 23:40:26 +08:00
|
|
|
cd $(PUBLISHDIR); git add -A; git commit -s -m "publish"; git push origin master;
|
2018-03-06 14:54:44 +08:00
|
|
|
|
|
|
|
|
|
|
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
|
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
|
|
%: Makefile doxy
|
|
|
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|