Re: [PATCH 12/13] Makefile: teach scripts to include make variables
- From
Jeff King <peff@peff.net>
- Date
- Feb 10, 2014, 01:15 UTC
- Message-ID
- <20140210011511.GA12773@sigill.intra.peff.net>
- In-Reply-To
- <87a9e1l1jv.fsf@thomasrast.ch>
On Sat, Feb 08, 2014 at 10:47:16PM +0100, Thomas Rast wrote:
Show 19 quoted lines
> Jeff King <peff@peff.net> writes: > > > The current scheme for getting build-time variables into a > > shell script is to munge the script with sed, and stick the > > munged variable into a special sentinel file so that "make" > > knows about the dependency. > > > > Instead, we can combine both functions by generating a shell > > snippet with our value, and then "building" shell scripts by > > concatenating their snippets. "make" then handles the > > dependency automatically, and it's easy to generate tighter > > dependencies. > > > > We demonstrate here by moving the "DIFF" substitution into > > its own snippet, which lets us rebuild only the single > > affected file when it changes. > > I can't look right now *why* this happens, but this breaks > ./t2300-cd-to-toplevel.sh --valgrind with messages like
I think it's the bug that Junio already pointed out; git-sh-setup gets the DIFF=... snippet instead of the initial #!-line. I didn't look at the details, but that probably screws up valgrind's symlinking, since we no longer realize it's a shell script.
Once that bug is fixed, I'll double-check that the problem goes away.
-Peff