1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-21 11:54:15 +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 TOOLS_DIR := $(if $(OPENPILOT_TOOLS_DIR),$(call slashfix,$(OPENPILOT_TOOLS_DIR)),$(ROOT_DIR)/tools)
export BUILD_DIR := $(ROOT_DIR)/build export BUILD_DIR := $(ROOT_DIR)/build
export PACKAGE_DIR := $(ROOT_DIR)/build/package 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) # Set up default build configurations (debug | release)
GCS_BUILD_CONF := release GCS_BUILD_CONF := release
@ -907,18 +907,18 @@ build-info:
# #
############################## ##############################
.PHONY: source .PHONY: dist
source: dist:
@$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(SOURCE_DIR))" @$(ECHO) " SOURCE FOR DISTRIBUTION $(call toprel, $(DIST_DIR))"
$(V1) $(MKDIR) -p "$(SOURCE_DIR)" $(V1) $(MKDIR) -p "$(DIST_DIR)"
$(V1) $(VERSION_INFO) \ $(V1) $(VERSION_INFO) \
--jsonpath="$(SOURCE_DIR)" --jsonpath="$(DIST_DIR)"
$(eval SOURCE_NAME := $(call toprel, "$(SOURCE_DIR)/OpenPilot-$(shell git describe).tar")) $(eval DIST_NAME := $(call toprel, "$(DIST_DIR)/OpenPilot-$(shell git describe).tar"))
$(V1) git archive --prefix="OpenPilot/" -o "$(SOURCE_NAME)" HEAD $(V1) git archive --prefix="OpenPilot/" -o "$(DIST_NAME)" HEAD
$(V1) tar --append --file="$(SOURCE_NAME)" \ $(V1) tar --append --file="$(DIST_NAME)" \
--transform='s,.*version-info.json,OpenPilot/version-info.json,' \ --transform='s,.*version-info.json,OpenPilot/version-info.json,' \
$(call toprel, "$(SOURCE_DIR)/version-info.json") $(call toprel, "$(DIST_DIR)/version-info.json")
$(V1) gzip -f "$(SOURCE_NAME)" $(V1) gzip -f "$(DIST_NAME)"
@ -1057,7 +1057,7 @@ help:
@$(ECHO) " clean_package - Clean, build and package the OpenPilot platform-dependent package" @$(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) " package - Build and package the OpenPilot platform-dependent package (no clean)"
@$(ECHO) " opfw_resource - Generate resources to embed firmware binaries into the GCS" @$(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)
@$(ECHO) " [Code Formatting]" @$(ECHO) " [Code Formatting]"
@$(ECHO) " uncrustify_<source> - Reformat <source> code according to the project's standards" @$(ECHO) " uncrustify_<source> - Reformat <source> code according to the project's standards"