From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
git@vger.kernel.org, Jiang Xin <worldhello.net@gmail.com>
Subject: Re: [PATCH 2/3] Makefile: use `find` to determine static header dependencies
Date: Tue, 26 Aug 2014 08:34:27 -0400 [thread overview]
Message-ID: <20140826123427.GD29180@peff.net> (raw)
In-Reply-To: <xmqq4mx0kyrx.fsf@gitster.dls.corp.google.com>
On Mon, Aug 25, 2014 at 03:08:50PM -0700, Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
> >> Wouldn't it be sufficient to start digging not from "*" but from
> >> "??*"?
> >
> > Gah, the * was supposed to be . in my examples (though it doesn't
> > hurt).
> >
> >> find ??* \( -name Documentation -o -name .\?\* \) -prune -o -name \*.h
> >
> > Heh. Yeah, that would work. ;-)
>
> Continuing useless discussion...
>
> Actually as you are not excluding CVS, RCS, etc., and using ??* as
> the starting point will exclude .git, .hg, etc. at the top, I think
> we can shorten it even further and say
>
> find ??* -name Documentation -prune -o -name \*.h
>
> or something.
I had originally considered starting with "find *", but I was worried
about shell globbing overflowing command-line limits here. "echo *" on a
built tree is about 12K. That's laughably small for Linux, but would
other systems (which, after all, are the main targets) be more picky?
POSIX lists 4K as the minimum, and that has to fit the environment, too.
I'd also be fine to try it and see if anybody on an antique system
complains.
> Don't we want to exclude contrib/ by the way?
Probably. For calculating dependencies, it is OK to be overly
conservative (the worst case is that we trigger a recompile if somebody
touched contrib/.../foo.h, which is rather unlikely).
For the .pot file, being conservative is a little annoying. In theory
we might want to translate stuff in contrib/, but it probably is just
extra work for translators for not much benefit (though I have not
really used gettext; I assume it only pulls in strings marked with _()
and friends, so being conservative is maybe not that big a deal...).
In that sense, maybe we should just hit the whole tree to be on the
conservative side. The two reasons I did not in my initial attempt were:
1. Performance. But with the final form, we only the run the `find` at
all very rarely, so shaving off a few readdirs() is not that big a
deal.
2. There are a few problematic areas. t/perf may contain build trees
which are copies of git, which I expect would confuse gettext.
So I dunno.
-Peff
next prev parent reply other threads:[~2014-08-26 12:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-08 21:58 [PATCH] Update hard-coded header dependencies Jonathan Nieder
2014-08-10 19:48 ` Jeff King
2014-08-21 8:24 ` Jeff King
2014-08-21 8:29 ` [PATCH 1/2] Makefile: use "find" to determine static " Jeff King
2014-08-21 14:48 ` Jonathan Nieder
2014-08-22 4:12 ` Jeff King
2014-08-22 4:27 ` [PATCH v2 0/3] dropping manually-maintained LIB_H Jeff King
2014-08-22 4:32 ` [PATCH 1/3] i18n: treat "make pot" as an explicitly-invoked target Jeff King
2014-08-22 4:33 ` [PATCH 2/3] Makefile: use `find` to determine static header dependencies Jeff King
2014-08-25 19:30 ` Junio C Hamano
2014-08-25 19:33 ` Jeff King
2014-08-25 19:46 ` Jonathan Nieder
2014-08-25 20:00 ` Jeff King
2014-08-25 20:09 ` Jeff King
2014-08-25 20:45 ` Jonathan Nieder
2014-08-25 21:03 ` Junio C Hamano
2014-08-25 21:27 ` Jonathan Nieder
2014-08-25 22:08 ` Junio C Hamano
2014-08-26 12:34 ` Jeff King [this message]
2014-08-26 16:54 ` Junio C Hamano
2014-08-26 17:29 ` Jeff King
2014-08-26 19:40 ` Junio C Hamano
2014-08-22 4:33 ` [PATCH 3/3] Makefile: drop CHECK_HEADER_DEPENDENCIES code Jeff King
2014-08-23 11:06 ` [PATCH 1/2] Makefile: use "find" to determine static header dependencies Jiang Xin
2014-08-21 8:31 ` [PATCH 2/2] Makefile: drop CHECK_HEADER_DEPENDENCIES code Jeff King
2014-08-10 23:31 ` [PATCH] Update hard-coded header dependencies Junio C Hamano
2014-08-10 23:39 ` Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140826123427.GD29180@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=worldhello.net@gmail.com \
/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.
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 NNTP newsgroup(s).