Re: Makefile dependency from 'configure' to 'GIT-VERSION-FILE'
- From
Martin von Zweigbergk <martinvonz@gmail.com>
- Date
- Jan 2, 2013, 07:47 UTC
- Message-ID
- <CANiSa6iMea95ELqS3-w01bL=LTgE9Cx6+8sXK=s-pPPFwjGCCA@mail.gmail.com>
- In-Reply-To
- <20130102072141.GB18974@elie.Belkin>
On Tue, Jan 1, 2013 at 11:21 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> > How about this patch (untested)?
Looks good. Thanks!
Show 24 quoted lines
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -2267,12 +2267,9 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
>> mv $@+ $@
>> endif # NO_PYTHON
>>
>> -configure: configure.ac GIT-VERSION-FILE
>> +configure: configure.ac
> [...]
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -142,7 +142,10 @@ fi
>> ## Configure body starts here.
>>
>> AC_PREREQ(2.59)
>> -AC_INIT([git], [@@GIT_VERSION@@], [git@vger.kernel.org])
>> +AC_INIT([git],
>> + m4_esyscmd([ ./GIT-VERSION-GEN &&
>> + { sed -ne 's/GIT_VERSION = //p' GIT-VERSION-FILE | xargs echo -n; } ]),
>> + [git@vger.kernel.org])
>
> I don't think that would warrant dropping the GIT-VERSION-FILE
> dependency, since the resulting configure script still hard-codes the
> version number.Yeah, you're right. I was merely sweeping the dependency under the rug :-(
Show 14 quoted lines
> > diff --git a/Makefile b/Makefile > index 736ecd45..2a22041f 100644 > --- a/Makefile > +++ b/Makefile > @@ -2275,7 +2275,7 @@ configure: configure.ac GIT-VERSION-FILE > $(RM) $<+ > > ifdef AUTOCONFIGURED > -config.status: configure > +config.status: configure.ac > $(QUIET_GEN)if test -f config.status; then \ > ./config.status --recheck; \ > else \
The next line just outside the context here does depend on 'configure', which is why I thought this would not be right. But it seems impossible to get away from that, and AUTOCONFIGURED should only be set when ./configure has been run (IIUC), so it's not even realistic to have "git reconfigure" fail to find "./configure". So, again, looks good.