-ifeq "$(BIN_DIST)" ""
- @echo "WARNING: To run the binary-dist target, you need to set BIN_DIST=1 in mk/build.mk"
- @false
-endif
- -rm -rf $(BIN_DIST_DIR)
- -$(RM) $(BIN_DIST_DIR).tar.gz
- $(MKDIRHIER) $(BIN_DIST_DIR)/bin/$(TARGETPLATFORM)
+ $(MKDIRHIER) $(BIN_DIST_DIR)/mk
+ echo 'include $$(TOP)/Makefile-vars' > $(BIN_DIST_DIR)/mk/boilerplate.mk
+ echo 'include $$(TOP)/mk/install.mk' > $(BIN_DIST_DIR)/mk/target.mk
+ echo 'include $$(TOP)/mk/recurse.mk' >> $(BIN_DIST_DIR)/mk/target.mk
+ echo '' > $(BIN_DIST_DIR)/mk/compat.mk
+ cp mk/package.mk $(BIN_DIST_DIR)/mk/
+ cp mk/install.mk $(BIN_DIST_DIR)/mk/
+ cp mk/recurse.mk $(BIN_DIST_DIR)/mk/