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

Re: [RFC PATCH v2 1/2] Makefile: add check-headers target

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 10, 2014, 17:09 UTC
Message-ID
<xmqq38bzieqj.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140910000328.GB12644@gmail.com>
David Aguilar <davvid@gmail.com> writes:
Show 13 quoted lines
> On Mon, Sep 08, 2014 at 12:57:46PM -0700, Junio C Hamano wrote:
>> Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
>> ...
>> > for header in .h ewah/*.h vcs-svn/*.h xdiff/*.h
>> > do
>> > 	...
>> > done
>> 
>> Yes, that would be even better.  Then you wouldn't even have to
>> worry about $IFS dance.
>
> The original motivation was to avoid picking up the generated
> common-cmds.h header file.
	for header
        do
        	case "$header" in $exceptions) continue ;; esac
		...
	done

with comments describing why these exceptions are made would be a better way to go in such a case.

> It was the N_() function that was messing it up.
>
> Would it make sense to split out a separate patch that makes common-cmds.h
> check-headers clean?

Depends on why "gcc -c $header"-cleanliness needs to be strictly enforced, I think.

"common-cmds.h" is merely a way to allow us maintain a part of its single includer help.c mechanically maintained, and if anybody else includes it, it is an error, even if that includer does so after including "gettext.h".

Some effort would be required to butcher "common-cmds.h' to make it include "gettext.h" but that amount of effort can be better spent to add a check to make sure nobody else includes it, I would have to say.

Previous: David AguilarNext: Matthieu Moy
Message 13 of 14 in “Makefile: add check-headers target”
  1. 1/2 Makefile: add check-headers targetDavid Aguilar, Sep 7, 2014
  2. 2/2 headers: include dependent headersDavid Aguilar, Sep 7, 2014
  3. René ScharfeSep 7, 2014
  4. Jonathan NiederSep 7, 2014
  5. Johannes SixtSep 7, 2014
  6. Jonathan NiederSep 7, 2014
  7. David AguilarSep 7, 2014
  8. Jonathan NiederSep 7, 2014
  9. Junio C HamanoSep 8, 2014
  10. Matthieu MoySep 8, 2014
  11. Junio C HamanoSep 8, 2014
  12. David AguilarSep 10, 2014
  13. Junio C HamanoSep 10, 2014
  14. Matthieu MoySep 10, 2014

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.