Re: Makefile dependency from 'configure' to 'GIT-VERSION-FILE'

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

 



On Tue, Jan 1, 2013 at 11:21 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote:
>
> How about this patch (untested)?

Looks good. Thanks!

>> --- 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@xxxxxxxxxxxxxxx])
>> +AC_INIT([git],
>> +       m4_esyscmd([ ./GIT-VERSION-GEN &&
>> +                    { sed -ne 's/GIT_VERSION = //p' GIT-VERSION-FILE | xargs echo -n; } ]),
>> +       [git@xxxxxxxxxxxxxxx])
>
> 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 :-(

>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]