git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/9] Makefile: add a hdr-check target

From
MÅMartin Ågren <martin.agren@gmail.com>
Date
Sep 19, 2018, 17:49 UTC
Message-ID
<CAN0heSpNT25PrNwdbQKZo=Q8kpSfwnzuOz34xKHtfF+Fq9ZXmg@mail.gmail.com>
In-Reply-To
<d24df21a-7ab2-84f6-8b18-83fd9c8c2b30@ramsayjones.plus.com>
Hi Ramsay,
On Wed, 19 Sep 2018 at 02:07, Ramsay Jones <ramsay@ramsayjones.plus.com> wrote:
Show 5 quoted lines
> @@ -2675,6 +2676,17 @@ $(SP_OBJ): %.sp: %.c GIT-CFLAGS FORCE
>  .PHONY: sparse $(SP_OBJ)
>  sparse: $(SP_OBJ)
>
> +GEN_HDRS := command-list.h unicode-width.h

Most of the things happening around here are obvious steps towards the end-goal and seem to logically belong here, together. This one though, "generated headers"(?) seems like it is more general in nature, so could perhaps live somewhere else.

Actually, we have a variable `GENERATED_H` which seems to try to do more or less the same thing. It lists just one file, though, command-list.h. And unicode-width.h seems to be tracked in git.git.

Maybe use `GENERATED_H` instead, and list unicode-width.h on the next line instead? Or am I completely misreading "GEN_HDRS"?

Show 13 quoted lines
> +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
Previous: Ramsay JonesNext: Ramsay Jones
Message 2 of 7 in “Makefile: add a hdr-check target”
  1. 1/9 Makefile: add a hdr-check targetRamsay Jones, Sep 19, 2018
  2. Martin ÅgrenSep 19, 2018
  3. Ramsay JonesSep 19, 2018
  4. Martin ÅgrenSep 20, 2018
  5. Junio C HamanoSep 20, 2018
  6. Ramsay JonesSep 20, 2018
  7. Junio C HamanoSep 20, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.