Please sign in to comment.
Improve our Makefile (#95)
* Makefile: fix usage of variables Using variables like $SHIPPER_IMAGE instead of $(SHIPPER_IMAGE) causes errors like this: /bin/sh: HIPPER_IMAGE: command not found It appears make interpolates variables like $(THIS) instead of like $THIS. * Makefile: track dependencies of shipper binaries First of all, "shipper" is not a phony target : it actually generates a binary called "shipper". I suppose it was declared as phony so `make shipper` would always be executed, instead of bailing out with "make: `shipper' is up to date." If we declare our dependencies correctly, though, it'll always execute if the dependencies are changed, which is most likely what we actually want, so let's do that.  https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html * Makefile: allow variables to be overridden by the environment It's very useful to be able to override names of images and commands executed by the Makefile during testing. I can have my own image registry, put shipper in any namespace I want, and I can also teach it to work with microk8s.kubectl without having to resort to symlinks :) * Makefile: depend on nested dirs inside pkg/ vendor/ Silly me, pkg/* doesn't actually go deeper than 1 level, pkg/**/* is needed for that. Without it, modifying any files inside any directory in pkg/ or vendor/ and then calling `make shipper` wouldn't actually result in the task being executed.
- Loading branch information...