summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorMarshall Dawson <marshalldawson3rd@gmail.com>2016-12-23 10:16:43 -0500
committerMartin Roth <martinroth@google.com>2017-02-01 20:14:53 +0100
commit8f470c7a7ef78266564403f46543737b400d8be6 (patch)
tree4f746ef914c76c7ee809d1e6c4206b7acd93098b /payloads
parent9e33e27a461e245a48208f57d93da7c23d1dbe33 (diff)
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 <marshalldawson3rd@gmail.com> Reviewed-on: https://review.coreboot.org/18269 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/external/depthcharge/Makefile13
1 files changed, 11 insertions, 2 deletions
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