Makefile: fix 'hdr-check' when GCRYPT not installed

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ramsay Jones committed Mar 6, 2019 at 00:11 UTC f23aa18e7fef59f9187a733e752dc425aa5346bf
1 file changed +4 -1
Makefile
+4 -1
@@ -2694,7 +2694,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
2694 sparse: $(SP_OBJ)
2695
2696 GEN_HDRS := command-list.h unicode-width.h
2697 -EXCEPT_HDRS := $(GEN_HDRS) compat% xdiff%
2697 +EXCEPT_HDRS := $(GEN_HDRS) compat/% xdiff/%
2698 +ifndef GCRYPT_SHA256
2699 + EXCEPT_HDRS += sha256/gcrypt.h
2700 +endif
2701 CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
2702 HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
2703