forked from F5Networks/f5-declarative-onboarding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (54 loc) · 1.73 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = FDeclarativeOnboarding
SOURCEDIR = docs
BUILDDIR = docs/_build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
# Custom commands for building and testing project documentation
# build live preview of docs locally
.PHONY: preview
preview:
@echo "Running autobuild. View live edits at:"
@echo " http://0.0.0.0:8000"
@echo ""
sphinx-autobuild --host 0.0.0.0 -b html $(SOURCEDIR) $(BUILDDIR)/html
# run docs quality tests locally
.PHONY: test
test:
rm -rf docs/_build
./scripts/test-docs.sh
# one-time html build using a docker container
.PHONY: docker-html
docker-html:
rm -rf docs/_build
./scripts/docker-docs.sh make html
# Build live preview of docs in a docker container
.PHONY: docker-preview
docker-preview:
rm -rf docs/_build
DOCKER_RUN_ARGS="-p 127.0.0.1:8000:8000" \
./scripts/docker-docs.sh \
sphinx-autobuild --host 0.0.0.0 -b html $(SOURCEDIR) $(BUILDDIR)/html
# run docs quality tests in a docker container
.PHONY: docker-test
docker-test:
rm -rf docs/_build
./scripts/docker-docs.sh ./scripts/test-docs.sh
# build an RPM from the current source tree
.PHONY: rpm
rpm:
./scripts/rpmbuild.sh
# build an RPM from the current source tree in a docker container
.PHONY: docker-rpm
docker-rpm:
./scripts/docker-rpmbuild.sh