From: Thomas Rast Date: Tue, 19 Jun 2012 18:40:04 GMT Subject: Re: [PATCH 2/4] version: add git_user_agent function Message-ID: <87pq8vrvqz.fsf@thomas.inf.ethz.ch> In-Reply-To: <20120602190112.GB14369@sigill.intra.peff.net> I'm terribly late to the party, seeing as this is already in next, but: Jeff King writes: > This is basically a fancy way of saying "git/$GIT_VERSION", > except that it is overridable at build-time and through the > environment. Which means that people who don't want to > advertise their git version (for privacy or security > reasons) can tweak it. ... > +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? -- Thomas Rast trast@{inf,student}.ethz.ch