Skip to content

Commit 1c4bd9f

Browse files
committed
certs: unify duplicated cmd_extract_certs and improve the log
cmd_extract_certs is defined twice. Unify them. The current log shows the input file $(2), which might be empty. You cannot know what is being created from the log, "EXTRACT_CERTS". Change the log to show the output file with better alignment. [Before] EXTRACT_CERTS certs/signing_key.pem CC certs/system_keyring.o EXTRACT_CERTS AS certs/system_certificates.o CC certs/common.o CC certs/blacklist.o EXTRACT_CERTS AS certs/revocation_certificates.o [After] CERT certs/signing_key.x509 CC certs/system_keyring.o CERT certs/x509_certificate_list AS certs/system_certificates.o CC certs/common.o CC certs/blacklist.o CERT certs/x509_revocation_list AS certs/revocation_certificates.o Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Nicolas Schier <[email protected]>
1 parent c537e4d commit 1c4bd9f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

certs/Makefile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ else
1212
obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_nohashes.o
1313
endif
1414

15+
quiet_cmd_extract_certs = CERT $@
16+
cmd_extract_certs = scripts/extract-cert $(2) $@
17+
1518
ifeq ($(CONFIG_SYSTEM_TRUSTED_KEYRING),y)
1619

1720
$(eval $(call config_filename,SYSTEM_TRUSTED_KEYS))
@@ -22,9 +25,6 @@ $(obj)/system_certificates.o: $(obj)/x509_certificate_list
2225
# Cope with signing_key.x509 existing in $(srctree) not $(objtree)
2326
AFLAGS_system_certificates.o := -I$(srctree)
2427

25-
quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
26-
cmd_extract_certs = scripts/extract-cert $(2) $@
27-
2828
targets += x509_certificate_list
2929
$(obj)/x509_certificate_list: scripts/extract-cert $(SYSTEM_TRUSTED_KEYS_SRCPREFIX)$(SYSTEM_TRUSTED_KEYS_FILENAME) FORCE
3030
$(call if_changed,extract_certs,$(SYSTEM_TRUSTED_KEYS_SRCPREFIX)$(CONFIG_SYSTEM_TRUSTED_KEYS))
@@ -98,9 +98,6 @@ $(eval $(call config_filename,SYSTEM_REVOCATION_KEYS))
9898

9999
$(obj)/revocation_certificates.o: $(obj)/x509_revocation_list
100100

101-
quiet_cmd_extract_certs = EXTRACT_CERTS $(patsubst "%",%,$(2))
102-
cmd_extract_certs = scripts/extract-cert $(2) $@
103-
104101
targets += x509_revocation_list
105102
$(obj)/x509_revocation_list: scripts/extract-cert $(SYSTEM_REVOCATION_KEYS_SRCPREFIX)$(SYSTEM_REVOCATION_KEYS_FILENAME) FORCE
106103
$(call if_changed,extract_certs,$(SYSTEM_REVOCATION_KEYS_SRCPREFIX)$(CONFIG_SYSTEM_REVOCATION_KEYS))

0 commit comments

Comments
 (0)