aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 12f5f53..754b1e4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
1include config.mk 1include config.mk
2 2
3BINARY_PATH=./bin 3BINARY_PATH = ./bin
4TARGET = $(BINARY_PATH)/$(NAME)
4IMPORTER_FILES = $(shell find tools/importer/ -type f -name '*.go') 5IMPORTER_FILES = $(shell find tools/importer/ -type f -name '*.go')
5 6
6CSS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/css/ -type f -name '*.css')) 7CSS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/css/ -type f -name '*.css'))
@@ -13,7 +14,7 @@ LESSC := ./node_modules/less/bin/lessc
13 14
14-include $(DEPFILES) 15-include $(DEPFILES)
15 16
16all: assets app 17all: assets $(TARGET) $(IMPORTER)
17 18
18print_info: 19print_info:
19 @echo $(CSS_FILES) 20 @echo $(CSS_FILES)
@@ -21,8 +22,10 @@ print_info:
21 @echo $(JS_FILES) 22 @echo $(JS_FILES)
22 @echo $(DEPFILES) 23 @echo $(DEPFILES)
23 24
24app: 25$(NAME): $(TARGET)
25 go build -o $(BINARY_PATH)/$(NAME) 26
27$(TARGET): eventlogging/events.go
28 go build -o $@
26 29
27.npm_update: package.json 30.npm_update: package.json
28 touch $@ 31 touch $@
@@ -51,6 +54,9 @@ assets/js/%.js: assets_src/js/%.js assets_src/js/%.d .babelrc .npm_update
51 @echo browserify $< -o $@ 54 @echo browserify $< -o $@
52 @$(BROWSERIFY) --debug $< -o $@ -t babelify 55 @$(BROWSERIFY) --debug $< -o $@ -t babelify
53 56
57eventlogging/events.go: eventlogging/events.txt
58 ./bin/generate-events < $< > $@
59
54clean: 60clean:
55 -rm -- $(BINARY_PATH)/$(NAME) 61 -rm -- $(BINARY_PATH)/$(NAME)
56 -rm -- $(CSS_FILES) 62 -rm -- $(CSS_FILES)
@@ -58,6 +64,7 @@ clean:
58 -rm -- $(JS_FILES) 64 -rm -- $(JS_FILES)
59 -rm -- $(DEPFILES) 65 -rm -- $(DEPFILES)
60 -rm -- importer 66 -rm -- importer
67 -rm -- eventlogging/events.go
61 68
62superclean: clean 69superclean: clean
63 -rm -- .npm_update 70 -rm -- .npm_update
@@ -66,11 +73,11 @@ superclean: clean
66ultraclean: superclean 73ultraclean: superclean
67 -rm -r -- node_modules 74 -rm -r -- node_modules
68 75
69run: assets 76run: assets $(TARGET)
70 go run *.go 77 $(TARGET)
71 78
72importer: $(IMPORTER_FILES) 79importer: $(IMPORTER_FILES)
73 go build -o importer tools/importer/*.go 80 go build -o importer tools/importer/*.go
74 81
75.PHONY: all assets app print_info clean superclean ultraclean run 82.PHONY: all assets $(NAME) $(TARGET) print_info clean superclean ultraclean run
76 83