diff --git a/Makefile b/Makefile index 664ed7b6..d64d260f 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,18 @@ -NPM_PREFIX=node_modules +NPM_PREFIX=$(realpath node_modules) +PATH:=${NPM_PREFIX}/.bin:${PATH} .PHONY: test test: setup styleguide-app/elm.js - ${NPM_PREFIX}/.bin/elm-package diff - ${NPM_PREFIX}/.bin/elm-format --validate src tests styleguide-app - ${NPM_PREFIX}/.bin/elm-test + elm-package diff + elm-format --validate src tests styleguide-app + elm-test .PHONY: test clean: rm -rf node_modules styleguide-app/elm.js: styleguide-app/elm-stuff $(glob styleguide-app/*.elm styleguide-app/**/*.elm) - cd styleguide-app; ../${NPM_PREFIX}/.bin/elm-make Main.elm --output=elm.js + cd styleguide-app; elm-make Main.elm --output=elm.js # plumbing @@ -23,13 +24,13 @@ node_modules: package.json touch -m $@ elm-stuff: package.json node_modules - ${NPM_PREFIX}/.bin/elm-package install --yes + elm-package install --yes touch -m $@ tests/elm-stuff: tests/elm-package.json node_modules - cd tests; ../${NPM_PREFIX}/.bin/elm-package install --yes + elm-package install --yes touch -m $@ styleguide-app/elm-stuff: styleguide-app/elm-package.json node_modules - cd styleguide-app; ../${NPM_PREFIX}/.bin/elm-package install --yes + cd styleguide-app; elm-package install --yes touch -m $@