forked from boozallen/sdp-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 1.67 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = SolutionsDeliveryPlatform
SOURCEDIR = .
BUILDDIR = docs
.PHONY: help Makefile
.SILENT: info
# Put it first so that "make" without argument is like "make help".
help: ## Show target options
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
clean: ## removes remote documentation and compiled documentation
rm -rf docs/doctrees docs/html
# build docs
html: ## builds documentation in _build/html
## run make html live for hot reloading of edits during development
make clean
docker build . -t sdp-docs
$(eval goal := $(filter-out $@,$(MAKECMDGOALS)))
@if [ "$(goal)" = "live" ]; then\
docker run -p 8000:8000 -v $(shell pwd):/app sdp-docs sphinx-autobuild -b html $(ALLSPHINXOPTS) . $(BUILDDIR)/html -H 0.0.0.0;\
elif [ "$(goal)" = "deploy" ]; then\
docker run -v $(shell pwd):/app sdp-docs $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O);\
git add docs/*;\
git commit -m "updating documentation";\
git push;\
else\
docker run -v $(shell pwd):/app sdp-docs $(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O);\
fi
deploy: ;
live: ;
info:
@:
list: ## lists container images in the repository and where they are built
@echo "Listing container images and where they're built: "
@find . -type f -name Makefile -execdir make info \;
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
echo "Make command $@ not found"