1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

change make source rule to more correct make dist rule

This commit is contained in:
James Duley 2014-12-04 21:32:05 +13:00
parent 5ebee4acf0
commit d956c1977a

View File

@ -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_<source> - Reformat <source> code according to the project's standards"