From d956c1977ab18435feddbe522af747fde1086bec Mon Sep 17 00:00:00 2001 From: James Duley Date: Thu, 4 Dec 2014 21:32:05 +1300 Subject: [PATCH] change make source rule to more correct make dist rule --- Makefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 101ff9ff7..27f8ce9b2 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ export DL_DIR := $(if $(OPENPILOT_DL_DIR),$(call slashfix,$(OPENPILOT_DL_DI export TOOLS_DIR := $(if $(OPENPILOT_TOOLS_DIR),$(call slashfix,$(OPENPILOT_TOOLS_DIR)),$(ROOT_DIR)/tools) export BUILD_DIR := $(ROOT_DIR)/build export PACKAGE_DIR := $(ROOT_DIR)/build/package -export SOURCE_DIR := $(ROOT_DIR)/build/source +export DIST_DIR := $(ROOT_DIR)/build/dist # Set up default build configurations (debug | release) GCS_BUILD_CONF := release @@ -907,18 +907,18 @@ build-info: # ############################## -.PHONY: source -source: - @$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(SOURCE_DIR))" - $(V1) $(MKDIR) -p "$(SOURCE_DIR)" +.PHONY: dist +dist: + @$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_DIR))" + $(V1) $(MKDIR) -p "$(DIST_DIR)" $(V1) $(VERSION_INFO) \ - --jsonpath="$(SOURCE_DIR)" - $(eval SOURCE_NAME := $(call toprel, "$(SOURCE_DIR)/OpenPilot-$(shell git describe).tar")) - $(V1) git archive --prefix="OpenPilot/" -o "$(SOURCE_NAME)" HEAD - $(V1) tar --append --file="$(SOURCE_NAME)" \ + --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, "$(SOURCE_DIR)/version-info.json") - $(V1) gzip -f "$(SOURCE_NAME)" + $(call toprel, "$(DIST_DIR)/version-info.json") + $(V1) gzip -f "$(DIST_NAME)" @@ -1057,7 +1057,7 @@ help: @$(ECHO) " clean_package - Clean, build and package the OpenPilot platform-dependent package" @$(ECHO) " package - Build and package the OpenPilot platform-dependent package (no clean)" @$(ECHO) " opfw_resource - Generate resources to embed firmware binaries into the GCS" - @$(ECHO) " source - Generate source archive for distribution" + @$(ECHO) " dist - Generate source archive for distribution" @$(ECHO) @$(ECHO) " [Code Formatting]" @$(ECHO) " uncrustify_ - Reformat code according to the project's standards"