From 5e586355ed0414a1338450469b70672f2a6d7741 Mon Sep 17 00:00:00 2001 From: Thomas Joly Date: Tue, 25 Jun 2024 10:30:31 +0200 Subject: [PATCH] Update Makefile.target to match target id and name from bolos_target header (cherry picked from commit 21c4a1c543dea315db5fc911f8a858be566e2f2e) --- Makefile.target | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Makefile.target index ba0708f40..cad9810ad 100644 --- a/Makefile.target +++ b/Makefile.target @@ -34,8 +34,9 @@ $(error TARGET not set to a valid value (possible values: $(TARGETS))) endif TARGET_PATH := $(BOLOS_SDK)/target/$(TARGET) -TARGET_ID := $(shell cat $(TARGET_PATH)/include/bolos_target.h | grep TARGET_ID | cut -f3 -d' ') -TARGET_NAME := $(sort $(shell cat $(TARGET_PATH)/include/bolos_target.h | grep TARGET_ | grep -v TARGET_ID | cut -f2 -d' ')) +BOLOS_TARGET_H := $(TARGET_PATH)/include/bolos_target.h +TARGET_ID := $(shell grep -E "^\#define\s*TARGET_ID" $(BOLOS_TARGET_H) | cut -f3 -d' ') +TARGET_NAME := $(shell grep -E "^\#define\s*TARGET_[^I]" $(BOLOS_TARGET_H) | cut -f2 -d' ') SDK_NAME := "ledger-secure-sdk" SDK_VERSION := $(shell git -C $(BOLOS_SDK) describe --tags --exact-match --match "v[0-9]*" --dirty) SDK_HASH := $(shell git -C $(BOLOS_SDK) describe --always --dirty --exclude '*' --abbrev=40)