summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorAric Gardner <agardner@linuxfoundation.org>2015-07-31 17:15:46 -0400
committerAric Gardner <agardner@linuxfoundation.org>2015-07-31 17:30:35 -0400
commitf95e8d34d7482a3ac20e20cb589ab96db1879715 (patch)
treed7f9655dda4a957174e36f2c8b22dc15998bebaa /Makefile
parentb3afc0ad760f13a6507ac4a1ae75ba2334e08d46 (diff)
Adding make file and new conf.py for Documentation generation
Change-Id: I9ad2e1ff90811613b92e88444db9ca962257d76b Signed-off-by: Aric Gardner <agardner@linuxfoundation.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e69de29..884c0fe 100644
--- a/Makefile
+++ b/Makefile
@@ -0,0 +1,26 @@
+BUILDDIR := build
+DESIGN_DOCS = $(wildcard design_docs/*.rst)
+
+.PHONY: clean html pdf bps all
+
+all: bps html pdf
+
+clean:
+ rm -rf $(BUILDDIR)/*
+
+bps: $(DESIGN_DOCS) | $(BUILDDIR)
+ mkdir -p $(BUILDDIR)/design_docs
+ $(foreach f,$(DESIGN_DOCS),rst2html.py $(f) $(BUILDDIR)/$(f:.rst=.html);)
+
+html: | $(BUILDDIR)
+ sphinx-build -b html -c etc -d $(BUILDDIR)/doctrees \
+ requirements $(BUILDDIR)/requirements/html
+
+pdf: | $(BUILDDIR)
+ sphinx-build -b latex -c etc -d $(BUILDDIR)/doctrees \
+ requirements $(BUILDDIR)/requirements/latex
+ $(MAKE) -C $(BUILDDIR)/requirements/latex \
+ LATEXOPTS='--interaction=nonstopmode' all-pdf
+
+$(BUILDDIR):
+ mkdir -p $(BUILDDIR)