forked from bem-archive/bem-bl-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GNUmakefile
54 lines (41 loc) · 980 Bytes
/
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
all:: bem-bl
all:: $(patsubst %.bemjson.js,%.html,$(wildcard pages/*/*.bemjson.js))
BEM_BUILD=bem build \
-l bem-bl/blocks-common/ \
-l bem-bl/blocks-desktop/ \
-l blocks/ \
-d $< \
-t $1 \
-o $(@D) \
-n $(*F)
BEM_CREATE=bem create block \
-l pages \
-t $1 \
$(*F)
%.html: %.bemhtml.js %.css %.js %.ie.css
$(call BEM_CREATE,bem-bl/blocks-desktop/i-bem/bem/techs/html.js)
%.bemhtml.js: %.deps.js
$(call BEM_BUILD,bem-bl/blocks-desktop/i-bem/bem/techs/bemhtml.js)
%.deps.js: %.bemdecl.js
$(call BEM_BUILD,deps.js)
%.bemdecl.js: %.bemjson.js
$(call BEM_CREATE,bemdecl.js)
.PRECIOUS: %.css
%.css: %.deps.js
$(call BEM_BUILD,css)
.PRECIOUS: %.ie.css
%.ie.css: %.deps.js
$(call BEM_BUILD,ie.css)
.PRECIOUS: %.js
%.js: %.deps.js
$(call BEM_BUILD,js)
DO_GIT=@echo -- git $1 $2; \
if [ -d $2 ]; \
then \
cd $2 && git pull origin master; \
else \
git clone $1 $2; \
fi
bem-bl:
$(call DO_GIT,git://github.com/toivonen/bem-bl.git,$@)
.PHONY: all