]> granicus.if.org Git - git/commitdiff
hdr-check: make it work on Windows
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sat, 24 Aug 2019 22:36:55 +0000 (15:36 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Aug 2019 17:04:58 +0000 (10:04 -0700)
On Windows, we define a specific set of pre-processor macros, among
other reasons: to avoid including syslog.h (which is not available on
Windows).

The hdr-check target did not use those definitions, resulting in a
failure to include said syslog.h.

To fix that, let's let the hdr-check target make use of ALL_CFLAGS,
which does include the pre-processor macros that would e.g. skip the
conditional block including syslog.h.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile

index f9255344ae5009a192ab83a332be749632d94531..221dbb0830ab98e8d6b8a350484860c68d0c74ab 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2772,7 +2772,7 @@ CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(patsubst ./%,%,$(LIB_H)))
 HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
 
 $(HCO): %.hco: %.h FORCE
-       $(QUIET_HDR)$(CC) -include git-compat-util.h -I. -o /dev/null -c -xc $<
+       $(QUIET_HDR)$(CC) $(ALL_CFLAGS) -include git-compat-util.h -I. -o /dev/null -c -xc $<
 
 .PHONY: hdr-check $(HCO)
 hdr-check: $(HCO)