-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
45 lines (34 loc) · 1.12 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
SASS=sass --no-cache --style=compressed
HAML=haml --style ugly
CSS=$(filter-out www/static/_%.css, $(patsubst %.sass,%.css,$(wildcard www/static/*.sass)))
HTML=$(patsubst %.haml,%.html,$(wildcard www/*.haml))
#JSMIN=www/static/up++.min.js
JS=www/static/up++.js
.PHONY=build clean publish graphics
build: clean graphics $(CSS) $(HTML) $(JSMIN)
%.css: %.sass
$(SASS) $<:$@
#$(JSMIN): $(JS)
# uglifyjs -c -m --screw-ie8 $(JS) -o $(JSMIN)
%.html: %.haml
$(HAML) $< $@
clean:
-$(RM) $(HTML)
-$(RM) $(JSMIN)
-$(RM) www/static/*.css
-$(RM) www/static/*.css.map
www/img/polargrid-nq8.png: www/img/polargrid.png
-cd www/img; pngnq -v -f -Q f -s 1 -n 10 polargrid.png
www/img/up++logo-nq8.png: www/img/up++logo.png
-cd www/img; pngnq -v -f -Q f -s 1 -n 30 up++logo.png
graphics: www/img/polargrid-nq8.png www/img/up++logo-nq8.png
publish: build
-$(RM) -r output/*
mkdir -p output
cp -v CNAME output
cp -v $(HTML) output
mkdir -p output/static
cp -v $(CSS) $(JS) output/static
mkdir -p output/img
cp -vr $(wildcard www/img/*) output/img
cd output; git add -A; git commit -m "published `date --iso=minutes`"; git push origin master