git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Makefile: fix 'hdr-check' when GCRYPT not installed

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Mar 6, 2019, 00:11 UTC
Message-ID
<afd21027-52a7-7b4f-bf9c-024cc787b57b@ramsayjones.plus.com>

If the GCRYPT_SHA256 build variable is not set, then the 'hdr-check' target complains about the missing <gcrypt.h> header file. Add the 'sha256/gcrypt.h' header file to the exception list, if the build variable is not defined. While here, replace the 'xdiff%' filter pattern with 'xdiff/%' (and similarly for the compat pattern) since the original pattern inadvertently excluded the 'xdiff-interface.h' header.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Junio,

In my local 'hdr-check-fixup' branch, the gcrypt failure is fixed almost by default. However, given that we are going the 'git ls-files' route, this patch will fix it up.

Thanks!

ATB, Ramsay Jones

 Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index c5240942f2..fbc84cb541 100644
--- a/Makefile
+++ b/Makefile
@@ -2736,7 +2736,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
 sparse: $(SP_OBJ)
 
 GEN_HDRS := command-list.h unicode-width.h
-EXCEPT_HDRS := $(GEN_HDRS) compat% xdiff%
+EXCEPT_HDRS := $(GEN_HDRS) compat/% xdiff/%
+ifndef GCRYPT_SHA256
+	EXCEPT_HDRS += sha256/gcrypt.h
+endif
 CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
 HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
 
-- 
2.21.0
Message 1 of 1 in “Makefile: fix 'hdr-check' when GCRYPT not installed”
  1. Makefile: fix 'hdr-check' when GCRYPT not installedRamsay Jones, Mar 6, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.