Skip to content

Commit f23aa18

Browse files
ramsay-jonesgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0d0ac38 commit f23aa18

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2694,7 +2694,10 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
26942694
sparse: $(SP_OBJ)
26952695

26962696
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
26982701
CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
26992702
HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
27002703

0 commit comments

Comments
 (0)