Re: [PATCH 2/4] version: add git_user_agent function
- From
Jeff King <peff@peff.net>
- Date
- Jun 19, 2012, 18:59 UTC
- Message-ID
- <20120619185916.GA16429@sigill.intra.peff.net>
- In-Reply-To
- <87pq8vrvqz.fsf@thomas.inf.ethz.ch>
On Tue, Jun 19, 2012 at 08:40:04PM +0200, Thomas Rast wrote:
> I'm terribly late to the party, seeing as this is already in next, but:
It's never too late.
Show 11 quoted lines
> > +GIT_USER_AGENT = git/$(GIT_VERSION) > ... > > +GIT_USER_AGENT_SQ = $(subst ','\'',$(GIT_USER_AGENT)) > > +GIT_USER_AGENT_CQ = "$(subst ",\",$(subst \,\\,$(GIT_USER_AGENT)))" > > +GIT_USER_AGENT_CQ_SQ = $(subst ','\'',$(GIT_USER_AGENT_CQ)) > > +BASIC_CFLAGS += -DGIT_USER_AGENT='$(GIT_USER_AGENT_CQ_SQ)' > > Unless the user manually sets GIT_USER_AGENT, This forces a full rebuild > due to changed CFLAGS whenever the version changes. Can you make it so > that only version.o needs to be rebuilt, as with the normal git version > string?
Ick, yeah. I had though this was already the case, but it turns out that it was a peculiarity of my personal config.mak (I set a custom $prefix based on the branch, and it has a similar problem). I'll see if I can fix both.
-Peff