forked from getodk/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
90 lines (66 loc) · 2.32 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
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SPHINXPROJ = OpenDataKit
ODK1_SRCDIR = odk1-src
ODK2_SRCDIR = odk2-src
SHARED_SRCDIR = shared-src
COMPILE1_SRCDIR = tmp1-src
COMPILE2_SRCDIR = tmp2-src
ODK1_BUILDDIR = odk1-build
ODK2_BUILDDIR = odk2-build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help
.PHONY: help Makefile
odk1_clean:
rm -rf $(COMPILE1_SRCDIR)
rm -rf $(ODK1_BUILDDIR)
odk2_clean:
rm -rf $(COMPILE2_SRCDIR)
rm -rf $(ODK2_BUILDDIR)
odk1_clean_files:
rm -rf $(COMPILE1_SRCDIR)
rm -rf $(ODK1_BUILDDIR)/*
odk2_clean_files:
rm -rf $(COMPILE2_SRCDIR)
rm -rf $(ODK2_BUILDDIR)/*
clean: odk1_clean odk2_clean
odk1_copy: odk1_clean_files
mkdir $(COMPILE1_SRCDIR)
cp -rf $(ODK1_SRCDIR)/* $(COMPILE1_SRCDIR)
cp -rf $(SHARED_SRCDIR)/* $(COMPILE1_SRCDIR)
odk2_copy: odk2_clean_files
mkdir $(COMPILE2_SRCDIR)
cp -rf $(ODK2_SRCDIR)/* $(COMPILE2_SRCDIR)
cp -rf $(SHARED_SRCDIR)/* $(COMPILE2_SRCDIR)
odk1: odk1_copy
@$(SPHINXBUILD) -b dirhtml "$(COMPILE1_SRCDIR)" "$(ODK1_BUILDDIR)" $(SPHINXOPTS)
odk2: odk2_copy
@$(SPHINXBUILD) -b dirhtml "$(COMPILE2_SRCDIR)" "$(ODK2_BUILDDIR)" $(SPHINXOPTS)
odk1-deploy: odk1_copy
@$(SPHINXBUILD) -W -b dirhtml "$(COMPILE1_SRCDIR)" "$(ODK1_BUILDDIR)" $(SPHINXOPTS)
odk2-deploy: odk2_copy
@$(SPHINXBUILD) -W -b dirhtml "$(COMPILE2_SRCDIR)" "$(ODK2_BUILDDIR)" $(SPHINXOPTS)
build-all: odk1 odk2
odk1-latex: odk1
@$(SPHINXBUILD) -b latex "$(COMPILE1_SRCDIR)" "$(ODK1_BUILDDIR)"/latex $(SPHINXOPTS)
python util/resize.py "$(ODK1_BUILDDIR)"
odk2-latex: odk2
@$(SPHINXBUILD) -b latex "$(COMPILE2_SRCDIR)" "$(ODK2_BUILDDIR)"/latex $(SPHINXOPTS)
python util/resize.py "$(ODK2_BUILDDIR)"
odk1-style-check: odk1
python style-test.py -r $(COMPILE1_SRCDIR)
odk1-spell-check: odk1
sphinx-build -b spelling $(COMPILE1_SRCDIR) $(ODK1_BUILDDIR)/spelling
python util/check-spelling-output.py $(ODK1_BUILDDIR)
odk2-style-check: odk2
python style-test.py -r $(COMPILE2_SRCDIR)
odk2-spell-check: odk2
sphinx-build -b spelling $(COMPILE2_SRCDIR) $(ODK2_BUILDDIR)/spelling
python util/check-spelling-output.py $(ODK2_BUILDDIR)
odk1-check: odk1-style-check odk1-spell-check
odk2-check: odk2-style-check odk2-spell-check
check-all: odk1-check odk2-check