Re: [PATCH v2 4/5] Makefile: respect build info declared in "config.mak"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 20, 2024 at 05:47:14PM +0100, Patrick Steinhardt wrote:

> > This looks good. It fixes the issue, and I am happy that:
> > 
> > >  asciidoctor-extensions.rb: asciidoctor-extensions.rb.in FORCE
> > > -	$(QUIET_GEN)GIT_USER_AGENT="$(GIT_USER_AGENT)" $(SHELL_PATH) ../GIT-VERSION-GEN "$(shell pwd)/.." $< $@
> > > +	$(QUIET_GEN)$(SHELL_PATH) ../GIT-VERSION-GEN "$(shell pwd)/.." $< $@
> > 
> > ...these spots get even simpler.
> 
> Meh. I just noticed that this doesn't work: we include GIT-VERSION-FILE
> and export its value, and consequently any subsequent invocation of
> GIT-VERSION-GEN will continue to use the value that we have in
> GIT-VERSION-FILE. So it's effectively only computed the first time.

I'm not sure what you mean.

I wondered earlier if we might into a chicken-and-egg problem like that,
but I tested and it seemed to work fine. The rule for GIT-VERSION-FILE
means we'll build it before make reads it, so that first run of it will
get the updated value. And:

  make GIT_VERSION=foo && bin-wrappers/git version
  make GIT_VERSION=bar && bin-wrappers/git version

does what you'd expect. And the docs work the same way:

  cd Documentation
  make GIT_VERSION=foo git.1 && man -l git.1
  make GIT_VERSION=bar git.1 && man -l git.1

Is there a case you found that doesn't work?

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux