2018-01-17 19:23:16 +00:00
|
|
|
.PHONY: all node-deps clean run
|
|
|
|
|
2018-01-26 21:12:07 +00:00
|
|
|
TARGET=extension/elm.js
|
2018-01-17 19:23:16 +00:00
|
|
|
SOURCE=src/App.elm
|
|
|
|
|
|
|
|
ELM_FILES = $(shell find . -type f -name '*.elm')
|
|
|
|
NODE_BIN = ./node_modules/.bin
|
|
|
|
ELM-MAKE = $(NODE_BIN)/elm-make
|
|
|
|
ELM-REACTOR = $(NODE_BIN)/elm-reactor
|
2018-01-17 22:22:39 +00:00
|
|
|
ELM-TEST = $(NODE_BIN)/elm-test
|
2018-01-17 19:23:16 +00:00
|
|
|
|
|
|
|
ELMMAKE_FLAGS = --yes
|
|
|
|
ifeq ($(DEBUG),1)
|
|
|
|
ELMMAKE_FLAGS += --debug
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: node-deps $(TARGET)
|
|
|
|
|
|
|
|
node-deps:
|
|
|
|
npm i
|
|
|
|
|
|
|
|
$(TARGET): $(ELM_FILES)
|
|
|
|
$(ELM-MAKE) $(ELMMAKE_FLAGS) $(SOURCE) --output $@
|
|
|
|
|
|
|
|
clean-deps:
|
|
|
|
rm -rf elm-stuff
|
|
|
|
rm -rf node_modules
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(TARGET)
|
|
|
|
rm -rf elm-stuff/build-artifacts
|
|
|
|
|
|
|
|
run: all
|
|
|
|
$(ELM-REACTOR)
|
2018-01-17 22:22:39 +00:00
|
|
|
|
|
|
|
test:
|
|
|
|
$(ELM-TEST)
|