From: Ramsay Jones Date: Wed, 6 Mar 2019 00:11:13 +0000 (+0000) Subject: Makefile: fix 'hdr-check' when GCRYPT not installed X-Git-Tag: v2.22.0-rc0~152^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f23aa18e7fef59f9187a733e752dc425aa5346bf 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 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 Signed-off-by: Junio C Hamano --- diff --git a/Makefile b/Makefile index 1a44c811aa..6e7079add3 100644 --- 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))