elm-pass/Makefile

38 lines
602 B
Makefile
Raw Normal View History

2018-01-17 19:23:16 +00:00
.PHONY: all node-deps clean run
TARGET=elm.js
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)