git.iko.soy/heroku-buildpack-stack
on master help sign in
Makefile support cosmetics and README
ab4ad1bAaron Shim
README.md+6
@@ -35,6 +35,12 @@ before compilation, the `stack.yaml` will be substituted as follows:
35 -location:
35 -location:
36 git: https://mfine:abc123@github.com/mfine/heroku-buildpack-stack.git
36 git: https://mfine:abc123@github.com/mfine/heroku-buildpack-stack.git
37
37
38+
39+### Makefile Support
40+This buildpack now supports an optional Makefile, in case you need to coordinate other build steps with Stack. It assumes that the Makefile includes a `make install` target that uses the Stack build command with the flag `--copy-bins`. For example, a possible `install` target configuration in the Makefile could be:
41+
42+ install: stack build --copy-bins
43+
38[1]: https://github.com/mfine/heroku-buildpack-stack
44[1]: https://github.com/mfine/heroku-buildpack-stack
39[2]: http://devcenter.heroku.com/articles/buildpacks
45[2]: http://devcenter.heroku.com/articles/buildpacks
40[3]: https://github.com/commercialhaskell/stack
46[3]: https://github.com/commercialhaskell/stack
bin/compile+4−2
@@ -97,9 +97,11 @@ cd "$WORK_DIR"
97if [ -f "$BUILD_DIR/Makefile" ]; then
97if [ -f "$BUILD_DIR/Makefile" ]; then
98 speak "Makefile detected"
98 speak "Makefile detected"
99 make -C "$BUILD_DIR"
99 make -C "$BUILD_DIR"
100+ make -C "$BUILD_DIR" install
101+else
102+ stack setup
103+ stack build --fast --copy-bins
100fi
104fi
101−stack setup
102−stack build --fast --copy-bins
103
105
104# Set context environment variables.
106# Set context environment variables.
105set-env PATH "$WORK_DIR/.local/bin:$PATH"
107set-env PATH "$WORK_DIR/.local/bin:$PATH"