-
Notifications
You must be signed in to change notification settings - Fork 128
/
Makefile
130 lines (118 loc) · 4.29 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Makefile for Sphinx documentation
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
BUILDDIR = _build
export FORCE_COLOR = 1
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don\'t have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
TESTOPTS = -W --keep-going -n -E -q -d $(BUILDDIR)/doctrees $(SPHINXOPTS) .
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " clean to remove previous builds (cleans cache)"
@echo " html to make standalone HTML files"
@echo " livehtml to load the docs in a local server"
.PHONY: clean
clean:
@echo
@echo "Cleaning up files..."
@rm -f $(BUILDDIR)/.DS_Store
@rm -f $(BUILDDIR)/html/.DS_Store
@rm -rf $(BUILDDIR)/*
@echo "Old files removed..."
.PHONY: html
html:
@echo "Building the MINIFY Files..."
@echo
pip3 install cssmin
pip3 install jsmin
python3 _ext/assetminify.py
@echo
@echo "*****************************************************"
@echo " Building Splunk Observability Docs"
@echo "*****************************************************"
@echo
@echo "Building the HTML files from source..."
@echo
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: json
json:
@echo "Building the MINIFY Files..."
@echo
@echo "*****************************************************"
@echo " Building Splunk Observability Docs (JSON) "
@echo "*****************************************************"
@echo
@echo "Building the JSON files from source..."
@echo
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished. The JSON files are in $(BUILDDIR)/json."
.PHONY: xml
xml:
@echo "Building the MINIFY Files..."
@echo
@echo "*****************************************************"
@echo " Building Splunk Observability Docs (XML) "
@echo "*****************************************************"
@echo
@echo "Building the XML files from source..."
@echo
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: html-ja
html-ja:
@echo "Building the MINIFY Files for Japanese documentation..."
@echo
pip3 install cssmin
pip3 install jsmin
python3 _ext/assetminify.py
@echo
@echo "*****************************************************"
@echo " Building Japanese Splunk Observability Docs"
@echo "*****************************************************"
@echo
@echo "Building the Japanese HTML files from source..."
$(SPHINXBUILD) -b html -D language=ja_JA . $(BUILDDIR)/html/ja_JA
@echo
@echo "Build finished. The Japanese HTML pages are in $(BUILDDIR)/html/ja_JA."
.PHONY: livehtml
livehtml:
@echo
@echo "*****************************************************"
@echo " Running live server for Splunk Observability Docs"
@echo "*****************************************************"
@echo
@echo "Starting the live server..."
@echo
@sphinx-autobuild "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) --host 0.0.0.0 --port 8888 --ignore /docs/_static/main.min.css --ignore /docs/_static/main.min.js
.PHONY: test
test:
@echo
@echo "*****************************************************"
@echo " Testing Splunk Observability Docs build "
@echo "*****************************************************"
@echo
@echo "Testing the docs..."
@echo
@sphinx-build -b dummy $(TESTOPTS) $(BUILDDIR)/html
.PHONY: linkcheck
linkcheck:
@echo
@echo "*****************************************************"
@echo " Checking Splunk Observability Docs links "
@echo "*****************************************************"
@echo
@echo "Checking links..."
@echo
@sphinx-build -b linkcheck $(TESTOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."