From: Linus Torvalds <torva...@linux-foundation.org>

Use the filechk Kbuild function instead of manually comparing the
content of the generated file.

Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>
---
 kernel/Makefile | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/kernel/Makefile b/kernel/Makefile
index dc78819..3177160 100644
--- a/kernel/Makefile
+++ b/kernel/Makefile
@@ -136,13 +136,6 @@ ifeq ($(X509_CERTIFICATES),)
 $(warning *** No X.509 certificates found ***)
 endif
 
-ifneq ($(wildcard $(obj)/.x509.list),)
-ifneq ($(shell cat $(obj)/.x509.list),$(X509_CERTIFICATES))
-$(info X.509 certificate list changed)
-$(shell rm $(obj)/.x509.list)
-endif
-endif
-
 kernel/system_certificates.o: $(obj)/x509_certificate_list
 
 quiet_cmd_x509certs  = CERTS   $@
@@ -152,9 +145,12 @@ targets += $(obj)/x509_certificate_list
 $(obj)/x509_certificate_list: $(X509_CERTIFICATES) $(obj)/.x509.list
        $(call if_changed,x509certs)
 
+define filechk_x509_list
+       echo $(X509_CERTIFICATES)
+endef
 targets += $(obj)/.x509.list
-$(obj)/.x509.list:
-       @echo $(X509_CERTIFICATES) >$@
+$(obj)/.x509.list: Makefile FORCE
+       $(call filechk,x509_list)
 endif
 
 clean-files := x509_certificate_list .x509.list
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to