-
Notifications
You must be signed in to change notification settings - Fork 44
/
Makefile
45 lines (34 loc) · 962 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
40
41
42
43
44
45
sources = \
src/*.js \
src/*.ts \
src/*/*.js \
src/*/*.ts \
src/*/*/*.js \
src/*/*/*.ts \
src/*/*/*/*.js \
src/*/*/*/*.ts
all: install prepare
prepare: dist prepare-bundles prepare-mo
dist: $(wildcard $(sources)) tsconfig.json
tsc --build tsconfig.json
chmod +x dist/main.js
touch dist
public/javascripts/%-bundle.js : browser/%.js browser/deps/* package-lock.json
browserify -o $@ $<
bundles := \
commandpedia \
thingpedia-device-create \
thingpedia-device-translate \
thingpedia-portal \
blog-editor \
conversation
prepare-bundles: $(foreach b,$(bundles),public/javascripts/$(b)-bundle.js)
%.mo: %.po
msgfmt $< -o $@
languages := it zh_CN
prepare-mo: $(foreach l,$(languages),po/$(l).mo)
install: go/backend/backend
make -C sandbox all || echo WARNING: failed to compile the sandbox
go/backend/backend: go/*/*.go
test -f /usr/local/bin/backend || ( cd go/backend && go build )
.PHONY: install prepare prepare-bundles prepare-mo