forked from SunboX/FxStumbler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (39 loc) · 1.32 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
js = lib/leaflet/leaflet.js lib/localForage/dist/localforage.js lib/webL10n/l10n.js js/stumbler.js lib/cluster/cluster.js
css = style/form.css style/stumbler.css lib/leaflet/leaflet.css lib/cluster/cluster.css
jscmd := $(shell which uglifyjs2)
.PHONY: help all build zip watch debug update
default: help
help:
@echo "help - display this text"
@echo "all - compile zip file"
all: build zip
build:
test -s lib/localForage/.git -a -s lib/webL10n/.git || ( git submodule update --init --recursive && git submodule foreach git pull origin master )
test -d build || mkdir build
cat $(css) > build/style.css
ifeq ($(jscmd),)
cat $(js) > build/build.js
else
$(jscmd) $(js) \
-o build/build.js \
--screw-ie8
endif
debug:
test -s lib/localForage/.git -a -s lib/webL10n/.git || ( git submodule update --init --recursive && git submodule foreach git pull origin master )
test -d build || mkdir build
cat $(css) > build/style.css
ifeq ($(jscmd),)
cat $(js) > build/build.js
else
$(jscmd) $(js) \
-o build/build.js \
-b indent-level=2 \
--screw-ie8
endif
zip:
rm -f stumbler.zip
zip -r stumbler.zip index.html js build locales manifest.webapp icons package.manifest
watch:
while true; do inotifywait -e close_write,moved_to,create,modify $(js) $(css) ; make debug; done
update:
git submodule foreach git pull origin master