From b85952be6b454b53ba04c3d32e0810cde9f56cd4 Mon Sep 17 00:00:00 2001 From: James Duley Date: Sat, 31 Jan 2015 10:56:17 +1300 Subject: [PATCH] OP-1694 make package rule non-nested: tidy dist --- Makefile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 40185ae1b..6ae86e1c5 100644 --- a/Makefile +++ b/Makefile @@ -150,6 +150,9 @@ $(BUILD_DIR): $(PACKAGE_DIR): $(MKDIR) -p $@ +$(DIST_DIR): + $(MKDIR) -p $@ + ############################## # # UAVObjects @@ -876,21 +879,23 @@ build-info: # ############################## +DIST_VER_INFO := $(DIST_DIR)/version-info.json + +.PHONY: $(DIST_VER_INFO) # Because to many deps to list +$(DIST_VER_INFO): $(DIST_DIR) + $(V1) $(VERSION_INFO) --jsonpath="$(DIST_DIR)" + .PHONY: dist -dist: +dist: $(DIST_DIR) $(DIST_VER_INFO) @$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_DIR))" - $(V1) $(MKDIR) -p "$(DIST_DIR)" - $(V1) $(VERSION_INFO) \ - --jsonpath="$(DIST_DIR)" $(eval DIST_NAME := $(call toprel, "$(DIST_DIR)/OpenPilot-$(shell git describe).tar")) $(V1) git archive --prefix="OpenPilot/" -o "$(DIST_NAME)" HEAD $(V1) tar --append --file="$(DIST_NAME)" \ --transform='s,.*version-info.json,OpenPilot/version-info.json,' \ - $(call toprel, "$(DIST_DIR)/version-info.json") + $(call toprel, "$(DIST_VER_INFO)") $(V1) gzip -f "$(DIST_NAME)" - ############################## # # Install OpenPilot