diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -1,6 +1,7 @@ | |||
1 | include config.mk | 1 | include config.mk |
2 | 2 | ||
3 | BINARY_PATH=./bin | 3 | BINARY_PATH = ./bin |
4 | TARGET = $(BINARY_PATH)/$(NAME) | ||
4 | IMPORTER_FILES = $(shell find tools/importer/ -type f -name '*.go') | 5 | IMPORTER_FILES = $(shell find tools/importer/ -type f -name '*.go') |
5 | 6 | ||
6 | CSS_FILES = $(patsubst assets_src/%, assets/%, $(shell find assets_src/css/ -type f -name '*.css')) | 7 | CSS_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 | ||
16 | all: assets app | 17 | all: assets $(TARGET) $(IMPORTER) |
17 | 18 | ||
18 | print_info: | 19 | print_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 | ||
24 | app: | 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 | ||
57 | eventlogging/events.go: eventlogging/events.txt | ||
58 | ./bin/generate-events < $< > $@ | ||
59 | |||
54 | clean: | 60 | clean: |
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 | ||
62 | superclean: clean | 69 | superclean: clean |
63 | -rm -- .npm_update | 70 | -rm -- .npm_update |
@@ -66,11 +73,11 @@ superclean: clean | |||
66 | ultraclean: superclean | 73 | ultraclean: superclean |
67 | -rm -r -- node_modules | 74 | -rm -r -- node_modules |
68 | 75 | ||
69 | run: assets | 76 | run: assets $(TARGET) |
70 | go run *.go | 77 | $(TARGET) |
71 | 78 | ||
72 | importer: $(IMPORTER_FILES) | 79 | importer: $(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 | ||