Do use ALL_CFLAGS in hdr-check
PATCH 1/1 hdr-check: make it work on Windows
In reply to Johannes Schindelin via GitGitGadgetFrom: Johannes Schindelin <[email protected]>
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.
--- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
@@ -2741,7 +2741,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)
Signature · 1 line
gitgitgadget
cover Do use ALL_CFLAGS in hdr-check
When I was playing with the Makefile target hdr-check, it looked as if it missed the correct CFLAGS. Without them, on Windows an attempt is made to include syslog.h, which does not make sense at all.
This patch addresses that.
Johannes Schindelin (1):
hdr-check: make it work on Windows
Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
base-commit: c65a2884eae159bad540135479bc8afe20ff62d1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-129%2Fdscho%2Ffix-hdr-check-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-129/dscho/fix-hdr-check-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/129
Signature · 1 line
gitgitgadget
"Johannes Schindelin via GitGitGadget" <[email protected]>
Quoted 3 lines · writes:
When I was playing with the
Makefiletarget hdr-check, it looked as if it missed the correct CFLAGS. Without them, on Windows an attempt is made to includesyslog.h, which does not make sense at all.
Makes sense.
Thanks.