# This Makefile contains the rules required to set up our
# Dapper-based build environment; it can be copied as-is to
# other projects (and needs to be copied, it can't be shared
# via the Dapper image since it's needed to retrieve the image)

.dapper:
	@echo Downloading dapper
	@curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp
	@@chmod +x .dapper.tmp
	@./.dapper.tmp -v
	@mv .dapper.tmp .dapper

%: .dapper
	+./.dapper -m bind make $@ $(MAKEFLAGS)

shell: .dapper
	./.dapper -m bind -s

.PHONY: shell
