Web lists-archives.com

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




Hi Ramsay,

On Sun, 3 Mar 2019, Ramsay Jones wrote:

> 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

> 
> Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxxx>
> ---
>  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
>