diff --git a/Makefile b/Makefile index fc517737d..0dee29068 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/doxyfile b/acrn.doxyfile similarity index 99% rename from doxyfile rename to acrn.doxyfile index 1af23f45d..3c55f4bcc 100644 --- a/doxyfile +++ b/acrn.doxyfile @@ -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 diff --git a/scripts/pullsource.sh b/scripts/pullsource.sh new file mode 100755 index 000000000..2b9c99acd --- /dev/null +++ b/scripts/pullsource.sh @@ -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