git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 3 of 13 in “Makefile dependency from 'configure' to 'GIT-VERSION-FILE'”
  1. Martin von ZweigbergkJan 2, 2013
  2. Jonathan NiederJan 2, 2013
  3. Martin von ZweigbergkJan 2, 2013
  4. build: do not automatically reconfigure unless configure.ac changedJonathan Nieder, Jan 2, 2013
  5. Jeff KingJan 2, 2013
  6. Jonathan NiederJan 2, 2013
  7. Stefano LattariniJan 2, 2013
  8. Junio C HamanoJan 2, 2013
  9. Martin von ZweigbergkJan 2, 2013
  10. Stefano LattariniJan 2, 2013
  11. Junio C HamanoJan 2, 2013
  12. Stefano LattariniJan 2, 2013
  13. Jonathan NiederJan 2, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.