Ramsay Jones <ram...@ramsayjones.plus.com> writes:

> BTW, I happen to be on the 'pu' branch.
>
> I think some of the errors are due to missing compiler flags
> (-I, -D, etc); which flags did you pass to the compiler?
>
> Well, it killed 15min. before bed! ;-)
>
> ATB,
> Ramsay Jones

It certainly does look fun.  I anticipate (read: mostly "hinting
that I won't be the one who would be doing so") somebody would make
it a real patch, as the current trend seems to be to automate as
much checking as we reasonably can.

> -- >8 --
> Subject: [PATCH] Makefile: add a hdr-check target
>
> Signed-off-by: Ramsay Jones <ram...@ramsayjones.plus.com>
> ---
>  Makefile | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/Makefile b/Makefile
> index 9923db888c..798396c52e 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2684,6 +2684,16 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
>  .PHONY: sparse $(SP_OBJ)
>  sparse: $(SP_OBJ)
>  
> +EXCEPT_HDRS := ./compat% ./xdiff% ./ewah%
> +CHK_HDRS = $(filter-out $(EXCEPT_HDRS),$(LIB_H))
> +HCO = $(patsubst %.h,%.hco,$(CHK_HDRS))
> +
> +$(HCO): %.hco: %.h FORCE
> +     $(CC) -Wall -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

Reply via email to