Re: [PATCH v3 4/6] GIT-VERSION-GEN: fix overriding GIT_VERSION

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

 



On Fri, Dec 20, 2024 at 01:50:25PM -0800, Junio C Hamano wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> 
> > diff --git a/Documentation/Makefile b/Documentation/Makefile
> > index ff30ab6c4295525757f6a150ec4ff0c72487f440..a89823e1d1ee5042367bdcca6ed426196d49ce89 100644
> > --- a/Documentation/Makefile
> > +++ b/Documentation/Makefile
> > @@ -181,6 +181,10 @@ endif
> >  -include ../config.mak.autogen
> >  -include ../config.mak
> >  
> > +# Set GIT_VERSION_OVERRIDE such that version_gen knows to substitute
> > +# GIT_VERSION in case it was set by the user.
> > +GIT_VERSION_OVERRIDE := $(GIT_VERSION)
> > +
> >  ifndef NO_MAN_BOLD_LITERAL
> >  XMLTO_EXTRA += -m manpage-bold-literal.xsl
> >  endif
> 
> So the idea is that those targets and scripts may have their own
> GIT_VERION value when they run GIT-VERSION-GEN to cause GIT_VERSION
> to computed, and in such a case, they should pass the GIT_VERSION
> they have in GIT_VERSION_OVERRIDE, and thanks to the version_gen
> thing, this value in GIT_VERSION_OVERRIDE is passed in the
> environment as GIT_VERSION when GIT-VERSION-GEN is run, and the
> value in turn is passed intact.  Somehow this makes my head spin, as
> it looks quite convoluted, but the overall flow should yield the
> desired value.

Agreed, it makes mine spin, as well. Next release cycle I'll have a look
at whether I can get rid of the include of "GIT-VERSION-FILE" altogether
to make the logic simpler.

Patrick




[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