11
11
SPHINXOPTS ?= -q
12
12
SPHINXBUILD = sphinx-build
13
13
SPHINXPROJ = "Project ACRN"
14
- SOURCEDIR = .
15
14
BUILDDIR ?= _build
15
+ SOURCEDIR = $(BUILDDIR ) /rst/
16
16
17
17
# document publication assumes the folder structure is setup
18
18
# with the acrn-hypervisor and projectacrn.github.io repos as
@@ -33,40 +33,47 @@ help:
33
33
@echo " specify RELEASE=name to publish as a tagged release version"
34
34
@echo " and placed in a version subfolder. Requires repo merge permission."
35
35
36
- .PHONY : help Makefile
36
+ .PHONY : help Makefile copy-to-sourcedir doxy content kconfig html singlehtml clean publish
37
37
38
38
# Generate the doxygen xml (for Sphinx) and copy the doxygen html to the
39
39
# api folder for publishing along with the Sphinx-generated API docs.
40
40
41
- doxy :
42
- $(Q ) (cat acrn.doxyfile) | doxygen - > doc.log 2>&1
43
- $(Q ) find doxygen/xml/ * | xargs sed -i ' s/simplesect kind="pre"/simplesect kind="preconditions"/ '
41
+ copy-to-sourcedir :
42
+ $(Q ) mkdir -p $( SOURCEDIR )
43
+ $(Q ) rsync -rt --exclude= $( BUILDDIR ) . $( SOURCEDIR )
44
44
45
- content :
46
- $(Q ) scripts/extract_content.py . misc
45
+ doxy : copy-to-sourcedir
46
+ $(Q ) (cat acrn.doxyfile ; echo " OUTPUT_DIRECTORY=$( SOURCEDIR) /doxygen" ) | doxygen - > $(BUILDDIR ) /doc.log 2>&1
47
+ $(Q ) find $(SOURCEDIR ) /doxygen/xml/* | xargs sed -i ' s/simplesect kind="pre"/simplesect kind="preconditions"/'
47
48
48
- kconfig :
49
+ content : copy-to-sourcedir
50
+ $(Q ) scripts/extract_content.py $(SOURCEDIR ) misc
51
+
52
+ kconfig : copy-to-sourcedir
49
53
$(Q ) srctree=../hypervisor \
50
- python3 scripts/genrest.py Kconfig reference/kconfig/
54
+ python3 scripts/genrest.py Kconfig $( SOURCEDIR ) / reference/kconfig/
51
55
52
56
pullsource :
53
57
$(Q ) scripts/pullsource.sh
54
58
55
- html : doxy content kconfig
56
- -$(Q )$(SPHINXBUILD ) -t $(DOC_TAG ) -b html -d $(BUILDDIR ) /doctrees $(SOURCEDIR ) $(BUILDDIR ) /html $(SPHINXOPTS ) $(OPTS ) >> doc.log 2>&1
57
- $(Q ) ./scripts/filter-doc-log.sh doc.log
59
+ html : copy-to-sourcedir doxy content kconfig
60
+ -$(Q )$(SPHINXBUILD ) -t $(DOC_TAG ) -b html -d $(BUILDDIR ) /doctrees $(SOURCEDIR ) $(BUILDDIR ) /html $(SPHINXOPTS ) $(OPTS ) >> $( BUILDDIR ) / doc.log 2>&1
61
+ $(Q ) ./scripts/filter-doc-log.sh $( BUILDDIR ) / doc.log
58
62
59
63
singlehtml : doxy content kconfig
60
- -$(Q )$(SPHINXBUILD ) -t $(DOC_TAG ) -b singlehtml -d $(BUILDDIR ) /doctrees $(SOURCEDIR ) $(BUILDDIR ) /html $(SPHINXOPTS ) $(OPTS ) >> doc.log 2>&1
61
- $(Q ) ./scripts/filter-doc-log.sh doc.log
64
+ -$(Q )$(SPHINXBUILD ) -t $(DOC_TAG ) -b singlehtml -d $(BUILDDIR ) /doctrees $(SOURCEDIR ) $(BUILDDIR ) /html $(SPHINXOPTS ) $(OPTS ) >> $( BUILDDIR ) / doc.log 2>&1
65
+ $(Q ) ./scripts/filter-doc-log.sh $( BUILDDIR ) / doc.log
62
66
63
67
# Remove generated content (Sphinx and doxygen)
64
68
65
69
clean :
66
- rm -fr $(BUILDDIR ) doxygen
70
+ rm -fr $(BUILDDIR )
71
+ # Keeping these temporarily, but no longer strictly needed.
72
+ rm -fr doxygen
67
73
rm -fr misc
68
74
rm -fr reference/kconfig/* .rst
69
75
76
+
70
77
# Copy material over to the GitHub pages staging repo
71
78
# along with a README
72
79
0 commit comments