-
Notifications
You must be signed in to change notification settings - Fork 54
/
Makefile
69 lines (57 loc) · 1.92 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
68
69
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = F5ApplicationServices
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
node scripts/build/schema-build-doc.js
node scripts/build/schema-to-rst.js
node scripts/build/generate-all-properties-declaration.js -- --skip-require
@$(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/build/test-docs.sh
# one-time html build using a docker container
.PHONY: docker-html
docker-html:
rm -rf docs/_build
./scripts/build/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/build/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/build/docker-docs.sh ./scripts/build/test-docs.sh
# build an RPM from the current source tree
.PHONY: rpm
rpm:
./scripts/build/buildRpm.sh
# build an RPM from the current source tree in a docker container
.PHONY: docker-rpm
docker-rpm:
./scripts/build/docker-rpmbuild.sh