diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-05-03 15:33:11 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-05-04 15:12:31 +0200 |
commit | a05ac5545c43a5420757e0f5529edea95230ced5 (patch) | |
tree | 26638d4d3850cc1c039feb3fab5662889bd0f99e /crypto/Makefile | |
parent | 68153ecb28ebe9291880dfbf1f130dad1d9e64c8 (diff) | |
download | barebox-a05ac5545c43a5420757e0f5529edea95230ced5.tar.gz barebox-a05ac5545c43a5420757e0f5529edea95230ced5.tar.xz |
crypto: simplify $(srctree)/ handling and remove config_filename macro
The config_filename macro has been dropped from mainline in
b8c96a6b466c ("certs: simplify $(srctree)/ handling and remove
config_filename macro"). Adopt the mechanism it has been replaced with
for barebox.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto/Makefile')
-rw-r--r-- | crypto/Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/crypto/Makefile b/crypto/Makefile index be0f79d4e3..7e67f58bc7 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -25,7 +25,13 @@ extra-$(CONFIG_CRYPTO_RSA_BUILTIN_KEYS) += rsa-keys.h ifdef CONFIG_CRYPTO_RSA_BUILTIN_KEYS $(obj)/rsa.o: $(obj)/rsa-keys.h -$(eval $(call config_filename,CRYPTO_RSA_KEY)) -$(obj)/rsa-keys.h: FORCE - $(call cmd,rsa_keys,$(CONFIG_CRYPTO_RSA_KEY_NAME_HINT):$(CRYPTO_RSA_KEY_SRCPREFIX)$(CRYPTO_RSA_KEY_FILENAME)) + +CONFIG_CRYPTO_RSA_KEY := $(CONFIG_CRYPTO_RSA_KEY:"%"=%) + +ifneq ($(filter-out pkcs11:%, $(CONFIG_CRYPTO_RSA_KEY)),) +RSA_DEP := $(CONFIG_CRYPTO_RSA_KEY) +endif + +$(obj)/rsa-keys.h: $(RSA_DEP) FORCE + $(call cmd,rsa_keys,$(CONFIG_CRYPTO_RSA_KEY_NAME_HINT):$(if $(RSA_DEP),$<,$(CONFIG_CRYPTO_RSA_KEY))) endif |