-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 748 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 748 Bytes
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
.PHONY: dirs clean
INJECT_SCRIPT=tools/inject.py
INJECT=python $(INJECT_SCRIPT)
#BLD=build
BLD=alt_build
SRC_FILES=$(wildcard src/*)
DST_FILES=$(patsubst src/%,$(BLD)/%,$(SRC_FILES))
DAT_FILES=$(wildcard data/*.dat) $(wildcard data/*/*.dat)
SRC_D3_FILES=$(wildcard 3rd-party/*)
DST_D3_FILES=$(patsubst 3rd-party/%,$(BLD)/%,$(SRC_D3_FILES))
COMMON_DEPS=$(DAT_FILES) $(DST_D3_FILES)
all: $(DST_FILES)
dirs:
@test -d $(BLD) || mkdir -p $(BLD)
clean:
rm -rf $(BLD)/
$(BLD)/%.html: src/%.html \
$(INJECT_SCRIPT) \
$(COMMON_DEPS) \
tools/header_fragment.html | dirs
$(INJECT) -i $< -o $@
$(BLD)/%: src/% $(COMMON_DEPS) | dirs
cp $< $@
$(BLD)/d3.js: 3rd-party/d3.js | dirs
cp $< $@
$(BLD)/d3.min.js: 3rd-party/d3.min.js | dirs
cp $< $@