git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Ramsay Jones <ramsay@ramsayjones.plus.com>
To: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH v2 1/1] Makefile: use `git ls-files` to list header files, if possible
Date: Mon, 4 Mar 2019 21:01:54 +0000	[thread overview]
Message-ID: <99a38032-1182-7777-ccb2-1de97c284a84@ramsayjones.plus.com> (raw)
In-Reply-To: <ae65dbe2-cdcb-175b-af58-ab8482270ab9@ramsayjones.plus.com>



On 04/03/2019 20:38, Ramsay Jones wrote:
> 
> 
> On 04/03/2019 13:47, Johannes Schindelin via GitGitGadget wrote:
>> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>>
>> In d85b0dff72 (Makefile: use `find` to determine static header
>> dependencies, 2014-08-25), we switched from a static list of header
>> files to a dynamically-generated one, asking `find` to enumerate them.
>>
>> Back in those days, we did not use `$(LIB_H)` by default, and many a
>> `make` implementation seems smart enough not to run that `find` command
>> in that case, so it was deemed okay to run `find` for special targets
>> requiring this macro.
>>
>> However, as of ebb7baf02f (Makefile: add a hdr-check target,
>> 2018-09-19), $(LIB_H) is part of a global rule and therefore must be
>> expanded. Meaning: this `find` command has to be run upon every
>> `make` invocation. In the presence of many a worktree, this can tax the
>> developers' patience quite a bit.
>>
>> Even in the absence of worktrees or other untracked files and
>> directories, the cost of I/O to generate that list of header files is
>> simply a lot larger than a simple `git ls-files` call.
>>
>> Therefore, just like in 335339758c (Makefile: ask "ls-files" to list
>> source files if available, 2011-10-18), we now prefer to use `git
>> ls-files` to enumerate the header files to enumerating them via `find`,
>> falling back to the latter if the former failed (which would be the case
>> e.g. in a worktree that was extracted from a source .tar file rather
>> than from a clone of Git's sources).
>>
>> This has one notable consequence: we no longer include `command-list.h`
>> in `LIB_H`, as it is a generated file, not a tracked one, but that is
> 
> Heh, just to be _unnecessarily_ picky, but this is not always true.
> The 'command-list.h' header is _sometimes_ not included in the LIB_H
> variable - it simply depends on whether it has been generated by the
> time the $(FIND) is called.
> 
> Obviously, not worth a re-roll. Otherwise, this LGTM.

Ahem! Obviously, I didn't read the commit message closely enough!

However, _before_ this change, then 'command-list.h' was sometimes
not included in $(LIB_H) ...

Sorry for the noise!

ATB,
Ramsay Jones

  reply	other threads:[~2019-03-04 21:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-01 19:57 [PATCH 0/1] Avoid calling find in the Makefile, if possible Johannes Schindelin via GitGitGadget
2019-03-01 19:57 ` [PATCH 1/1] Makefile: use `git ls-files` to list header files, " Johannes Schindelin via GitGitGadget
2019-03-01 21:36   ` Jeff King
2019-03-01 21:54     ` Jeff King
2019-03-01 22:01       ` Jeff King
2019-03-02 19:54         ` Johannes Schindelin
2019-03-03 17:08           ` Jeff King
2019-03-02 19:57       ` Johannes Schindelin
2019-03-03 17:11         ` Jeff King
2019-03-02 20:05     ` Johannes Schindelin
2019-03-03 17:19       ` Jeff King
2019-03-03 21:30         ` Ramsay Jones
2019-03-04 12:38           ` Johannes Schindelin
2019-03-04 20:31             ` Ramsay Jones
2019-03-04 21:37             ` Jeff King
2019-03-04 11:08         ` Johannes Schindelin
2019-03-04 21:41           ` Jeff King
2019-03-05  5:50             ` Junio C Hamano
2019-03-05 15:28               ` Johannes Schindelin
2019-03-05 22:26                 ` Junio C Hamano
2019-03-05 23:07               ` Jeff King
2019-03-06  0:23                 ` Ramsay Jones
2019-03-06  4:40                   ` Jeff King
2019-03-06  5:28                     ` Junio C Hamano
2019-03-06 19:05                       ` [PATCH] compat/bswap: add include header guards Jeff King
2019-03-06 22:42                         ` Junio C Hamano
2019-03-04 13:47 ` [PATCH v2 0/1] Avoid calling find in the Makefile, if possible Johannes Schindelin via GitGitGadget
2019-03-04 13:47   ` [PATCH v2 1/1] Makefile: use `git ls-files` to list header files, " Johannes Schindelin via GitGitGadget
2019-03-04 20:38     ` Ramsay Jones
2019-03-04 21:01       ` Ramsay Jones [this message]
2019-03-04 21:43     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=99a38032-1182-7777-ccb2-1de97c284a84@ramsayjones.plus.com \
    --to=ramsay@ramsayjones.plus.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=johannes.schindelin@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).