Re: [PATCH 1/1] Makefile: use `git ls-files` to list header files, if possible
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 5, 2019, 15:28 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1903051627050.41@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqzhq9vpik.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Tue, 5 Mar 2019, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes: > > > This makes sense to me, though as you noted elsewhere, it doesn't fix > > the gcrypt problem, since that file unconditionally wants to look at the > > system gcrypt.h (and we control at the Makefile level whether we > > actually look at sha256/gcrypt.h). > > Hmm, is that because the header check target does not know which *.h > files we ship are actually used in a particular build? > > After a normal build, with dynamic dependency checking on, we would > have sufficient information to figure it out. Would that help?
Yes, *if* the dynamic dependency checking is in effect (read: if we are compiling with GCC).
However, I think that one of the benefits of the current approach is that hdr-check finds issues also in headers that are *not* part of the current build. Read: once hdr-check is run as part of the CI build, it is harder for some random contributor to break hdr-check for somebody else with different compile time options.
Ciao, Dscho