Hi, I’m trying to construction build targets dynamically without success. Here’s an example Makefile to mimic the situation (on GNU Make 3.81 built for i386-apple-darwin11.3.0.):
VERSION = old
release: VERSION = new
@echo Release: $(VERSION)
helm-%: | push-$$(VERSION)
I’d have expected all targets to end with “new” when I run `make release`. However, this is the output I see:
It looks like docker-$$(VERSION) is using the older instance of VERSION instead of the reassigned target specific variable. However this logic works fine for helm- and push targets. Any thoughts on why this is happening?