Makefile: fix 'hdr-check' when GCRYPT not installed
[gitweb.git] / Makefile
index 1a44c811aa56330327172cf693c61f9a221e4e16..6e7079add3e0b68c07dcd425cdb12aa3eeddd82d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2694,7 +2694,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))