-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 926 Bytes
/
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
MIN := .min
PAGES := site/home.html site/packages.html site/docs.html site/reports.html
INCLUDES := src/include/head.html src/include/header.html \
src/include/footer.html
SCRIPTS := site/js/utils$(MIN).js site/js/packages$(MIN).js \
site/js/docs$(MIN).js site/js/reports$(MIN).js
PYTHON := python
COFFEE := coffee
MINIFY := google-closure-compiler
.PHONY: init
all: $(PAGES) $(SCRIPTS)
site/%.html: src/pages/%.html $(INCLUDES)
@echo ">_HTML $<"
@$(PYTHON) generate-html.py $<
site/js/%.js: src/coffee/%.coffee
@mkdir -p site/js
@echo "COFFEE $<"
@$(COFFEE) -o site/js -c $<
site/js/%.min.js: site/js/%.js
@echo "MINIFY $<"
@$(MINIFY) --js $< --js_output_file $@
@rm -f $<
clean:
@rm -rf $(PAGES) site/js
init:
@echo "setting .git/hooks"
@find .git/hooks -type l -exec rm {} \;
@find .githooks -type f -exec ln -sf ../../{} .git/hooks/ \;