summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTomi Juvonen <tomi.juvonen@nokia.com>2015-09-23 09:45:06 +0300
committerTomi Juvonen <tomi.juvonen@nokia.com>2015-11-24 07:18:46 +0200
commit236143f29b63205a6e3271bab553de448d9dfe1d (patch)
tree3a270a74c2fb4b5badedc869f2dc981dacc333f8 /Makefile
parent853ed1577c3e87318b8b8f2adb4210f5a5d7459f (diff)
Fencing requirement.
Update requirement documentation about fencing. Change-Id: I3c0b4aaaa31c3eb958efc5cc483821ce96082aa8 Jira: DOCTOR-10
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 26 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 884c0fe8..1e06ef3c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,26 +1,44 @@
BUILDDIR := build
+PUBLICDIR := public
DESIGN_DOCS = $(wildcard design_docs/*.rst)
+MANUALS = $(wildcard manuals/*.rst)
-.PHONY: clean html pdf bps all
+.PHONY: clean html pdf bps man all public
-all: bps html pdf
+define index
+ rm -f $1/index.html
+ find $1 -type f | while read a; do echo "<li><a href=$${a#$1/}>$${a#$1/}</a></li>" >> $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)/*
-bps: $(DESIGN_DOCS) | $(BUILDDIR)
+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: | $(BUILDDIR)
+html:
sphinx-build -b html -c etc -d $(BUILDDIR)/doctrees \
requirements $(BUILDDIR)/requirements/html
-pdf: | $(BUILDDIR)
+pdf:
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)