improve automation

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2018-03-06 15:12:49 -08:00
parent ef28a56978
commit 25ed56bc82
3 changed files with 37 additions and 5 deletions

View File

@ -8,23 +8,38 @@ SPHINXPROJ = "Project ACRN"
SOURCEDIR = .
BUILDDIR = _build
PUBLISHDIR = ../projectacrn.github.io
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
pullsource:
$(Q)scripts/pullsource.sh
# Generate the doxygen xml (for Sphinx) and copy the doxygen html to the
# api folder for publishing along with the Sphinx-generated API docs.
doxy:
$(Q)(cat doxyfile) | doxygen - 2>&1
doxy: pullsource
$(Q)(cat acrn.doxyfile) | doxygen - 2>&1
$(Q)mkdir -p _build/html/api/doxygen
$(Q)cp -r doxygen/html/* _build/html/api/doxygen
# Remove generated content (Sphinx and doxygen)
clean:
$(Q)(rm -fr $(BUILDDIR) doxygen)
$(Q)rm -fr $(BUILDDIR) doxygen hypervisor devicemodel
# Copy material over to the GitHub pages staging repo
publish:
$(Q)mv $(PUBLISHDIR)/README.md $(PUBLISHDIR)/.README.md
$(Q)rm -fr $(PUBLISHDIR)/*
$(Q)mv $(PUBLISHDIR)/.README.md $(PUBLISHDIR)/README.md
$(Q)cp -r _build/html/* $(PUBLISHDIR)
# Catch-all target: route all unknown targets to Sphinx using the new

View File

@ -791,8 +791,7 @@ WARN_LOGFILE =
# Note: If this tag is empty the current directory is searched.
INPUT = custom-doxygen/mainpage.md \
hypervisor/include \
devicemodel/include/
_source/
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses

18
scripts/pullsource.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
# pull fresh copies of the ACRN source and copy public API headers
# over to the documentation tree
cd ../acrn-hypervisor;git pull
mkdir -p ../acrn_documentation/_source/hypervisor/include/common
cp include/common/hypercall.h ../acrn_documentation/_source/hypervisor/include/common
mkdir -p ../acrn_documentation/_source/hypervisor/include/public
cp include/public/acrn_common.h ../acrn_documentation/_source/hypervisor/include/public
cp include/public/acrn_hv_defs.h ../acrn_documentation/_source/hypervisor/include/public
cd ../acrn-devicemodel;git pull
mkdir -p ../acrn_documentation/_source/devicemodel/include
cp include/virtio.h ../acrn_documentation/_source/devicemodel/include