{"thread":{"id":"50662","subject":"[PATCH] Makefile: fix 'hdr-check' when GCRYPT not installed","startedAt":"2019-03-06T00:11:27Z","lastAt":"2019-03-06T00:11:27Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"370774","messageId":"afd21027-52a7-7b4f-bf9c-024cc787b57b@ramsayjones.plus.com","threadId":"50662","inReplyTo":null,"subject":"[PATCH] Makefile: fix 'hdr-check' when GCRYPT not installed","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2019-03-06T00:11:13Z","receivedAt":"2019-03-06T00:11:27Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIf the GCRYPT_SHA256 build variable is not set, then the 'hdr-check'\ntarget complains about the missing <gcrypt.h> header file. Add the\n'sha256/gcrypt.h' header file to the exception list, if the build\nvariable is not defined. While here, replace the 'xdiff%' filter\npattern with 'xdiff/%' (and similarly for the compat pattern) since\nthe original pattern inadvertently excluded the 'xdiff-interface.h'\nheader.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>\n---\n\nHi Junio,\n\nIn my local 'hdr-check-fixup' branch, the gcrypt failure is fixed\nalmost by default. However, given that we are going the 'git ls-files'\nroute, this patch will fix it up.\n\nThanks!\n\nATB,\nRamsay Jones\n\n Makefile | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex c5240942f2..fbc84cb541 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -2736,7 +2736,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE\n sparse: $(SP_OBJ)\n \n GEN_HDRS := command-list.h unicode-width.h\n-EXCEPT_HDRS := $(GEN_HDRS) compat% xdiff%\n+EXCEPT_HDRS := $(GEN_HDRS) compat/% xdiff/%\n+ifndef GCRYPT_SHA256\n+\tEXCEPT_HDRS += sha256/gcrypt.h\n+endif\n CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))\n HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))\n \n-- \n2.21.0\n"}]}