-
Notifications
You must be signed in to change notification settings - Fork 4
/
GNUmakefile
57 lines (49 loc) · 1.31 KB
/
GNUmakefile
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
#
# GNUmakefile: used to generate the Manta Debugging Guide from the asciidoc
# source files.
#
#
# Variables related to the guide itself and its dependencies.
#
GUIDE_HTML = index.html
GUIDE_DEPS = debugging-guide.adoc \
0000-intro.adoc \
0001-incident-response.adoc \
0002-investigation-tasks.adoc \
0003-quick-reference.adoc \
0004-deployment-specific.adoc \
0005-metrics.adoc
ASCIIDOC_OPTIONS = -b html5
#
# Variables related to final output directories.
#
OUT_DIR = docs
OUT_GUIDE = $(OUT_DIR)/$(GUIDE_HTML)
CLEAN_FILES += $(OUT_GUIDE)
#
# Macros for command used in recipes
#
ASCIIDOC = asciidoctor -o $@ $(ASCIIDOC_OPTIONS) $<
MKDIRP = mkdir -p $@
#
# Recipes
#
.DEFAULT_GOAL = all
#
# The "all" target builds all of the artifacts -- currently just the HTML
# version of the guide itself.
#
.PHONY: all
all: $(OUT_GUIDE)
$(OUT_GUIDE): $(GUIDE_DEPS) | $(OUT_DIR)
$(ASCIIDOC)
$(OUT_DIR):
$(MKDIRP)
#
# The "clean" target should bring the whole repo to the state of a fresh
# checkout. For simplicity, we put everything into a separate "build"
# directory.
#
.PHONY: clean
clean:
rm -rf $(CLEAN_FILES)