threads / patch / 50635

patchMakefile: remove the 'hdr-check' target

Subject: [PATCH] Makefile: remove the 'hdr-check' target

## tl;dr

2 messages between Mar 3, 2019 and Mar 4, 2019. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Ramsay Jones· Mar 3, 2019, 22:23 UTC · lore

The 'hdr-check' target has proved to be costly for some developers and platforms, depending on the configuration, even when not using this target. In part, this is due to the use of $(FIND) in the definition of the $(LIB_H) variable. This effectively reverts commit ebb7baf02f ("Makefile: add a hdr-check target", 2018-09-19).

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
 Makefile | 12 ------------
 1 file changed, 12 deletions(-)
Show changes to Makefile +0 −12
diff --git a/Makefile b/Makefile
index c5240942f2..dd3e38dc1f 100644
--- a/Makefile
+++ b/Makefile
@@ -1852,7 +1852,6 @@ ifndef V
 	QUIET_MSGFMT   = @echo '   ' MSGFMT $@;
 	QUIET_GCOV     = @echo '   ' GCOV $@;
 	QUIET_SP       = @echo '   ' SP $<;
-	QUIET_HDR      = @echo '   ' HDR $<;
 	QUIET_RC       = @echo '   ' RC $@;
 	QUIET_SUBDIR0  = +@subdir=
 	QUIET_SUBDIR1  = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
@@ -2735,17 +2734,6 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
 .PHONY: sparse $(SP_OBJ)
 sparse: $(SP_OBJ)
 
-GEN_HDRS := command-list.h unicode-width.h
-EXCEPT_HDRS := $(GEN_HDRS) compat% xdiff%
-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 $<
-
-.PHONY: hdr-check $(HCO)
-hdr-check: $(HCO)
-
 .PHONY: style
 style:
 	git clang-format --style file --diff --extensions c,h
-- 
2.21.0
Johannes Schindelin· Mar 4, 2019, 14:59 UTC · re: Ramsay Jones · lore

Re: [PATCH] Makefile: remove the 'hdr-check' target

Hi Ramsay,
On Sun, 3 Mar 2019, Ramsay Jones wrote:
Show 5 quoted lines
> The 'hdr-check' target has proved to be costly for some developers and
> platforms, depending on the configuration, even when not using this
> target. In part, this is due to the use of $(FIND) in the definition
> of the $(LIB_H) variable. This effectively reverts commit ebb7baf02f
> ("Makefile: add a hdr-check target", 2018-09-19).

As I said elsewhere, I think it would make sense to keep this target, and to wire it up to our CI builds.

Ciao, Dscho

Show 39 quoted lines
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>  Makefile | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index c5240942f2..dd3e38dc1f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1852,7 +1852,6 @@ ifndef V
>  	QUIET_MSGFMT   = @echo '   ' MSGFMT $@;
>  	QUIET_GCOV     = @echo '   ' GCOV $@;
>  	QUIET_SP       = @echo '   ' SP $<;
> -	QUIET_HDR      = @echo '   ' HDR $<;
>  	QUIET_RC       = @echo '   ' RC $@;
>  	QUIET_SUBDIR0  = +@subdir=
>  	QUIET_SUBDIR1  = ;$(NO_SUBDIR) echo '   ' SUBDIR $$subdir; \
> @@ -2735,17 +2734,6 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
>  .PHONY: sparse $(SP_OBJ)
>  sparse: $(SP_OBJ)
>  
> -GEN_HDRS := command-list.h unicode-width.h
> -EXCEPT_HDRS := $(GEN_HDRS) compat% xdiff%
> -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 $<
> -
> -.PHONY: hdr-check $(HCO)
> -hdr-check: $(HCO)
> -
>  .PHONY: style
>  style:
>  	git clang-format --style file --diff --extensions c,h
> -- 
> 2.21.0
> 

← back to recent threads