From 8f470c7a7ef78266564403f46543737b400d8be6 Mon Sep 17 00:00:00 2001 From: Marshall Dawson Date: Fri, 23 Dec 2016 10:16:43 -0500 Subject: payloads/depthcharge: Use variable target name Depending on the commit to build, depthcharge may have a different target name (depthcharge vs. depthcharge_unified). Add some logic to determine which name should be used based on the commit ID being requested. Change-Id: I05b853934d13696f4bd0d79d53ff6c5f59096d1c Signed-off-by: Marshall Dawson Reviewed-on: https://review.coreboot.org/18269 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth --- payloads/external/depthcharge/Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'payloads/external/depthcharge') diff --git a/payloads/external/depthcharge/Makefile b/payloads/external/depthcharge/Makefile index fb0c75bcaa..89db11193c 100644 --- a/payloads/external/depthcharge/Makefile +++ b/payloads/external/depthcharge/Makefile @@ -14,6 +14,11 @@ VBOOT_SOURCE ?= $(abspath $(CURDIR)/../../../3rdparty/vboot) TAG-$(DEPTHCHARGE_MASTER)=origin/master TAG-$(DEPTHCHARGE_STABLE)=$(STABLE_COMMIT_ID) +# todo: consider reverting this once stable moves past the commit below +payload_target=depthcharge +payload_target_old=$(payload_target)_unified +payload_namechange=74a07395eb9976747055b4ac7a0ae7dcb603a6f4 + unexport KCONFIG_AUTOHEADER unexport KCONFIG_AUTOCONFIG unexport KCONFIG_DEPENDENCIES @@ -60,8 +65,12 @@ config: $(libpayload_install_dir) checkout build: config echo " MAKE $(project_name) $(TAG-y)" - cd $(project_dir) && $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \ - VB_SOURCE=$(VBOOT_SOURCE) PATH="$(abspath ../../../build/util/cbfstool):$$PATH" depthcharge + cd $(project_dir) && \ + git merge-base --is-ancestor $(payload_namechange) $(TAG-y) >/dev/null 2>&1 && \ + $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \ + VB_SOURCE=$(VBOOT_SOURCE) PATH="$(abspath ../../../build/util/cbfstool):$$PATH" $(payload_target) || \ + $(MAKE) BOARD=$(BOARD) LIBPAYLOAD_DIR=$(libpayload_install_dir)/libpayload \ + VB_SOURCE=$(VBOOT_SOURCE) PATH="$(abspath ../../../build/util/cbfstool):$$PATH" $(payload_target_old) clean: test -d $(output_dir) && rm -rf $(output_dir) || exit 0 -- cgit v1.2.3