Projecte

General

Perfil

« Anterior | Següent » 

Revisió 17fd4110

Afegit per Pau Escrich fa aproximadament 11 anys

Add support for specify the full output image name in targets.mk

Visualitza les diferències:

Makefile
$(eval $(if $(TBUILD),,TBUILD=$(TARGET)))
BUILD_PATH=$(BUILD_DIR)/$(TBUILD)
#Getting output image paths
IMAGE_PATH = $(IMAGE)
SIMAGE_PATH = $(SYSUPGRADE)
#Getting output image paths and names
IMAGE_PATH = $(shell echo "$(IMAGE)" | cut -d " " -f1)
IM_NAME= $(shell echo "$(IMAGE)" | cut -d " " -f2)
SIMAGE_PATH = $(shell echo "$(SYSUPGRADE)" | cut -d " " -f1)
SIM_NAME = $(shell echo "$(SYSUPGRADE)" | cut -d " " -f2)
CONFIG = $(BUILD_PATH)/.config
KCONFIG = $(BUILD_PATH)/target/linux/$(ARCH)/config-*
......
define post_build
$(eval BRANCH_GIT=$(shell git --git-dir=$(BUILD_DIR)/qmp/.git branch|grep ^*|cut -d " " -f 2))
$(eval IM_NAME=$(NAME)-$(COMMUNITY)_$(BRANCH_GIT)-factory-$(TIMESTAMP).bin)
$(eval SIM_NAME=$(NAME)-$(COMMUNITY)_$(BRANCH_GIT)-sysupgrade-$(TIMESTAMP).bin)
$(if $(IM_NAME),,$(eval IM_NAME=$(NAME)-$(COMMUNITY)_$(BRANCH_GIT)-factory-$(TIMESTAMP).bin))
$(if $(SIM_NAM),,$(eval SIM_NAME=$(NAME)-$(COMMUNITY)_$(BRANCH_GIT)-sysupgrade-$(TIMESTAMP).bin))
$(eval COMP=$(shell ls $(BUILD_PATH)/$(IMAGE_PATH) 2>/dev/null | grep -c \\.gz))
mkdir -p $(IMAGES)
@[ $(COMP) -eq 1 ] && gunzip $(BUILD_PATH)/$(IMAGE_PATH) -c > $(IMAGES)/$(IM_NAME) || true

També disponible a: Unified diff