-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
64 lines (38 loc) · 1.25 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.PHONY: default clean static zip data build-tools xml2json
### Main -----------------------------------------------------------------------
default: static icons data
clean:
rm application.zip
### Application.zip: -----------------------------------------------------------
zip: application.zip
application.zip: \
default \
index.html \
manifest.webapp \
Makefile
zip -r application.zip static/ icons/ index.html manifest.webapp
### Static files: --------------------------------------------------------------
static: \
static/style.css
icons:
$(MAKE) -C icons/ > /dev/null
### CSS: -----------------------------------------------------------------------
static/style.css: \
static/css/*.less
lessc -x static/css/style.less $@
### Data: ----------------------------------------------------------------------
data: \
static/data \
static/data/dir.xiph.org.yp.json
static/data:
mkdir -p static/data
static/data/dir.xiph.org.yp.json: \
static/data/dir.xiph.org.yp.xml
cat "$<" | node xml2json > "$@"
static/data/dir.xiph.org.yp.xml:
curl 'http://dir.xiph.org/yp.xml' > "$@"
### Prerequisites: -------------------------------------------------------------
build-tools: \
xml2json
xml2json:
npm install -g 'git://github.com/buglabs/node-xml2json.git'