X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=Makefile;h=1e06ef3c320d1137f03e0e29ac1c6e5cb42a3bc5;hb=db992d5fed0acf2b80a5a62f8e6bc4277489cd8c;hp=909534671608ebf2cc6889cb85a91d696cfafbd6;hpb=377fd9a4d7f9cfc3817c18353f2eada300bd87b3;p=doctor.git
diff --git a/Makefile b/Makefile
index 90953467..1e06ef3c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,39 @@
-BUILDDIR = build
+BUILDDIR := build
+PUBLICDIR := public
DESIGN_DOCS = $(wildcard design_docs/*.rst)
+MANUALS = $(wildcard manuals/*.rst)
-.PHONY: clean html pdf all
+.PHONY: clean html pdf bps man all public
-all: html pdf
+define index
+ rm -f $1/index.html
+ find $1 -type f | while read a; do echo "
$${a#$1/}" >> $1/index.html; done
+endef
+
+all: man bps html pdf
+ $(call index,$(BUILDDIR))
+
+public:
+ rm -rf $(PUBLICDIR)
+ mkdir -p $(PUBLICDIR)
+ cp -r $(BUILDDIR)/manuals $(PUBLICDIR)/
+ cp -r $(BUILDDIR)/design_docs $(PUBLICDIR)/
+ cp -r $(BUILDDIR)/requirements/html $(PUBLICDIR)/
+ cp -r $(BUILDDIR)/requirements/latex/*.pdf $(PUBLICDIR)/
+ $(call index,$(PUBLICDIR))
clean:
rm -rf $(BUILDDIR)/*
-html: $(DESIGN_DOCS)
- mkdir -p build/design_docs
- rst2html.py $^ $(BUILDDIR)/$(^:.rst=.html)
+man:
+ mkdir -p $(BUILDDIR)/manuals
+ $(foreach f,$(MANUALS),rst2html.py $(f) $(BUILDDIR)/$(f:.rst=.html);)
+
+bps: $(DESIGN_DOCS)
+ mkdir -p $(BUILDDIR)/design_docs
+ $(foreach f,$(DESIGN_DOCS),rst2html.py $(f) $(BUILDDIR)/$(f:.rst=.html);)
+
+html:
sphinx-build -b html -c etc -d $(BUILDDIR)/doctrees \
requirements $(BUILDDIR)/requirements/html