* Makefile dependency from 'configure' to 'GIT-VERSION-FILE'
@ 2013-01-02 1:11 Martin von Zweigbergk
2013-01-02 7:21 ` Jonathan Nieder
0 siblings, 1 reply; 13+ messages in thread
From: Martin von Zweigbergk @ 2013-01-02 1:11 UTC (permalink / raw)
To: Stefano Lattarini, Jeff King, Jonathan Nieder; +Cc: git
Hi,
I use autoconf with git.git. I have noticed lately, especially when
doing things like "git rebase -i --exec make", that ./configure is run
every time. If I understand correctly, this is because of 8242ff4
(build: reconfigure automatically if configure.ac changes,
2012-07-19). Just a few days before that commit, on 2012-07-15, the
branch jn/makefile-cleanup including 520a6cd (Makefile: move
GIT-VERSION-FILE dependencies closer to use, 2012-06-20) was merged
(to next?). I wonder if these two subjects were aware of each other.
The reason 'configure' depends on GIT-VERSION-FILE is because it
inserts the version into the call to AC_INIT. I have close to no
experience with autoconf or even make and it's not at all clear to me
why we need to pass the verison to AC_INIT. It seems like it's just
for messages printed by ./configure. If that's the case, we shouldn't
need to generate a new 'configure' file ever time. At the very least,
we shouldn't need to run it.
Do you think we should simply remove the dependency from 'configure'
to 'GIT-VERSION-FILE' and leave a comment there instead? Or should we
instead somehow make 'reconfigure' depend only on 'configure.ac'? Both
of these feel a little wrong to me, because they would remove real
dependencies. Maybe the (probably mangled) patch at the end of this
message is better?
Martin
diff --git a/Makefile b/Makefile
index 736ecd4..ec5d7ca 100644
--- a/Makefile
+++ b/Makefile
@@ -2267,12 +2267,9 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh
mv $@+ $@
endif # NO_PYTHON
-configure: configure.ac GIT-VERSION-FILE
- $(QUIET_GEN)$(RM) $@ $<+ && \
- sed -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
- $< > $<+ && \
- autoconf -o $@ $<+ && \
- $(RM) $<+
+configure: configure.ac
+ $(QUIET_GEN)$(RM) $@ && \
+ autoconf -o $@ $<
ifdef AUTOCONFIGURED
config.status: configure
diff --git a/configure.ac b/configure.ac
index ad215cc..00c3e38 100644
--- 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])
AC_CONFIG_SRCDIR([git.c])
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: Makefile dependency from 'configure' to 'GIT-VERSION-FILE'
2013-01-02 1:11 Makefile dependency from 'configure' to 'GIT-VERSION-FILE' Martin von Zweigbergk
@ 2013-01-02 7:21 ` Jonathan Nieder
2013-01-02 7:47 ` Martin von Zweigbergk
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Nieder @ 2013-01-02 7:21 UTC (permalink / raw)
To: Martin von Zweigbergk; +Cc: Stefano Lattarini, Jeff King, git
Hi Martin,
Martin von Zweigbergk wrote:
> I use autoconf with git.git. I have noticed lately, especially when
> doing things like "git rebase -i --exec make", that ./configure is run
> every time. If I understand correctly, this is because of 8242ff4
> (build: reconfigure automatically if configure.ac changes,
> 2012-07-19).
How about this patch (untested)?
-- >8 --
Subject: build: do not automatically reconfigure unless configure.ac changed
Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
configure.ac changes, 2012-07-19), "config.status --recheck" is
automatically run every time the "configure" script changes. In
particular, that means the configuration procedure repeats whenever
the version number changes (since the configure script changes to
support "./configure --version" and "./configure --help"), making
bisecting painfully slow.
The intent was to make the reconfiguration process only trigger for
changes to configure.ac's logic. Tweak the Makefile rule to match
that intent by depending on configure.ac instead of configure.
Reported-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
[...]
> --- 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.
Sane?
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 \
--
1.8.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: Makefile dependency from 'configure' to 'GIT-VERSION-FILE'
2013-01-02 7:21 ` Jonathan Nieder
@ 2013-01-02 7:47 ` Martin von Zweigbergk
2013-01-02 8:25 ` [PATCH v2] build: do not automatically reconfigure unless configure.ac changed Jonathan Nieder
0 siblings, 1 reply; 13+ messages in thread
From: Martin von Zweigbergk @ 2013-01-02 7:47 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Stefano Lattarini, Jeff King, git
On Tue, Jan 1, 2013 at 11:21 PM, Jonathan Nieder <jrnieder@gmail.com> 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@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 :-(
>
> 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.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 7:47 ` Martin von Zweigbergk
@ 2013-01-02 8:25 ` Jonathan Nieder
2013-01-02 8:38 ` Jeff King
2013-01-02 8:42 ` Jonathan Nieder
0 siblings, 2 replies; 13+ messages in thread
From: Jonathan Nieder @ 2013-01-02 8:25 UTC (permalink / raw)
To: Martin von Zweigbergk; +Cc: Stefano Lattarini, Jeff King, git, Junio C Hamano
Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
configure.ac changes, 2012-07-19), configure is automatically run
every time the "configure" script changes. In particular, that
means configure is automatically rerun whenever the version number
changes (which changes the configure script to support "./configure
--helpe"), which makes bisecting painfully slow.
The intent was to make the reconfiguration process only trigger for
changes to configure.ac's logic. Tweak the Makefile rule to match
that intent by depending on configure.ac instead of configure.
Reported-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Martin von Zweigbergk wrote:
> The next line just outside the context here does depend on
> 'configure', which is why I thought this would not be right.
Yes, the 'configure' script that is run needs to reflect the changes
to configure.ac. Hopefully this version will work better.
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 736ecd45..be3bbcd4 100644
--- a/Makefile
+++ b/Makefile
@@ -2275,10 +2275,11 @@ 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 \
+ $(MAKE) configure && \
./configure; \
fi
reconfigure config.mak.autogen: config.status
--
1.8.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 8:25 ` [PATCH v2] build: do not automatically reconfigure unless configure.ac changed Jonathan Nieder
@ 2013-01-02 8:38 ` Jeff King
2013-01-02 8:48 ` Jonathan Nieder
2013-01-02 8:42 ` Jonathan Nieder
1 sibling, 1 reply; 13+ messages in thread
From: Jeff King @ 2013-01-02 8:38 UTC (permalink / raw)
To: Jonathan Nieder
Cc: Martin von Zweigbergk, Stefano Lattarini, git, Junio C Hamano
On Wed, Jan 02, 2013 at 12:25:44AM -0800, Jonathan Nieder wrote:
> Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
> configure.ac changes, 2012-07-19), configure is automatically run
> every time the "configure" script changes. In particular, that
> means configure is automatically rerun whenever the version number
> changes (which changes the configure script to support "./configure
> --helpe"), which makes bisecting painfully slow.
>
> The intent was to make the reconfiguration process only trigger for
> changes to configure.ac's logic. Tweak the Makefile rule to match
> that intent by depending on configure.ac instead of configure.
It seems I am late to the party. But FWIW, this looks the most sane to
me of the patches posted in this thread.
-Peff
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 8:38 ` Jeff King
@ 2013-01-02 8:48 ` Jonathan Nieder
2013-01-02 14:13 ` Stefano Lattarini
0 siblings, 1 reply; 13+ messages in thread
From: Jonathan Nieder @ 2013-01-02 8:48 UTC (permalink / raw)
To: Jeff King; +Cc: Martin von Zweigbergk, Stefano Lattarini, git, Junio C Hamano
Jeff King wrote:
> It seems I am late to the party. But FWIW, this looks the most sane to
> me of the patches posted in this thread.
Thanks. config.status runs ./configure itself, though, so the rule
should actually be
config.status: configure.ac
$(QUIET_GEN)$(MAKE) configure && \
if test -f config.status; then \
./config.status --recheck; \
else \
./configure;
fi
Rather than screw it up yet again, I'm going to sleep. :) If someone
else corrects the patch before tomorrow, I won't mind.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 8:48 ` Jonathan Nieder
@ 2013-01-02 14:13 ` Stefano Lattarini
2013-01-02 16:50 ` Junio C Hamano
0 siblings, 1 reply; 13+ messages in thread
From: Stefano Lattarini @ 2013-01-02 14:13 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Jeff King, Martin von Zweigbergk, git, Junio C Hamano
On 01/02/2013 09:48 AM, Jonathan Nieder wrote:
> Jeff King wrote:
>
>> It seems I am late to the party. But FWIW, this looks the most sane to
>> me of the patches posted in this thread.
>
> Thanks. config.status runs ./configure itself, though, so the rule
> should actually be
>
> config.status: configure.ac
> $(QUIET_GEN)$(MAKE) configure && \
> if test -f config.status; then \
> ./config.status --recheck; \
> else \
> ./configure;
> fi
>
> Rather than screw it up yet again, I'm going to sleep. :) If someone
> else corrects the patch before tomorrow, I won't mind.
>
FYI, this seems a sane approach to me. At least until Autoconf is
improved to offer better (read: some :-) support to "dynamic" package
version numbers specified at configure runtime. I hope that day
isn't too far, since the current Autoconf limitation has been causing
its share of annoyances small woes in Automake and Gnulib as well.
The only nit I have to offer is that I'd like to see more comments in
the git Makefile about why this "semi-hack" is needed.
Thanks,
Stefano
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 14:13 ` Stefano Lattarini
@ 2013-01-02 16:50 ` Junio C Hamano
2013-01-02 17:07 ` Martin von Zweigbergk
2013-01-02 19:35 ` Stefano Lattarini
0 siblings, 2 replies; 13+ messages in thread
From: Junio C Hamano @ 2013-01-02 16:50 UTC (permalink / raw)
To: Stefano Lattarini; +Cc: Jonathan Nieder, Jeff King, Martin von Zweigbergk, git
Stefano Lattarini <stefano.lattarini@gmail.com> writes:
> On 01/02/2013 09:48 AM, Jonathan Nieder wrote:
>> Jeff King wrote:
>>
>>> It seems I am late to the party. But FWIW, this looks the most sane to
>>> me of the patches posted in this thread.
>> ...
> FYI, this seems a sane approach to me....
> The only nit I have to offer is that I'd like to see more comments in
> the git Makefile about why this "semi-hack" is needed.
Thanks, everybody.
Please eyeball the below for (hopefully) the last time, to be
eventually merged to maint-1.7.12, maint-1.8.0 and maint (aka
maint-1.8.1) branches.
-- >8 --
From: Jonathan Nieder <jrnieder@gmail.com>
Date: Wed, 2 Jan 2013 00:25:44 -0800
Subject: [PATCH] build: do not automatically reconfigure unless configure.ac changed
Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
configure.ac changes, 2012-07-19), "config.status --recheck" is
automatically run every time the "configure" script changes. In
particular, that means the configuration procedure repeats whenever
the version number changes (since the configure script changes to
support "./configure --version" and "./configure --help"), making
bisecting painfully slow.
The intent was to make the reconfiguration process only trigger for
changes to configure.ac's logic. Tweak the Makefile rule to match
that intent by depending on configure.ac instead of configure.
Reported-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
---
Makefile | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 26b697d..2f5e2ab 100644
--- a/Makefile
+++ b/Makefile
@@ -2167,8 +2167,14 @@ configure: configure.ac GIT-VERSION-FILE
$(RM) $<+
ifdef AUTOCONFIGURED
-config.status: configure
- $(QUIET_GEN)if test -f config.status; then \
+# We avoid depending on 'configure' here, because it gets rebuilt
+# every time GIT-VERSION-FILE is modified, only to update the embedded
+# version number string, which config.status does not care about. We
+# do want to recheck when the platform/environment detection logic
+# changes, hence this depends on configure.ac.
+config.status: configure.ac
+ $(QUIET_GEN)$(MAKE) configure && \
+ if test -f config.status; then \
./config.status --recheck; \
else \
./configure; \
--
1.8.1.200.gd2acdf2
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 16:50 ` Junio C Hamano
@ 2013-01-02 17:07 ` Martin von Zweigbergk
2013-01-02 19:35 ` Stefano Lattarini
1 sibling, 0 replies; 13+ messages in thread
From: Martin von Zweigbergk @ 2013-01-02 17:07 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Stefano Lattarini, Jonathan Nieder, Jeff King, git
> diff --git a/Makefile b/Makefile
> index 26b697d..2f5e2ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2167,8 +2167,14 @@ configure: configure.ac GIT-VERSION-FILE
> $(RM) $<+
>
> ifdef AUTOCONFIGURED
> -config.status: configure
> - $(QUIET_GEN)if test -f config.status; then \
> +# We avoid depending on 'configure' here, because it gets rebuilt
> +# every time GIT-VERSION-FILE is modified, only to update the embedded
> +# version number string, which config.status does not care about. We
> +# do want to recheck when the platform/environment detection logic
> +# changes, hence this depends on configure.ac.
> +config.status: configure.ac
> + $(QUIET_GEN)$(MAKE) configure && \
> + if test -f config.status; then \
> ./config.status --recheck; \
> else \
> ./configure; \
Looks great (at least from my 'make'-incompetent point of view :-)). I
do appreciate the comment. Thanks, everyone.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 16:50 ` Junio C Hamano
2013-01-02 17:07 ` Martin von Zweigbergk
@ 2013-01-02 19:35 ` Stefano Lattarini
2013-01-02 20:25 ` Junio C Hamano
1 sibling, 1 reply; 13+ messages in thread
From: Stefano Lattarini @ 2013-01-02 19:35 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jonathan Nieder, Jeff King, Martin von Zweigbergk, git
On 01/02/2013 05:50 PM, Junio C Hamano wrote:
> Stefano Lattarini <stefano.lattarini@gmail.com> writes:
>
>> On 01/02/2013 09:48 AM, Jonathan Nieder wrote:
>>> Jeff King wrote:
>>>
>>>> It seems I am late to the party. But FWIW, this looks the most sane to
>>>> me of the patches posted in this thread.
>>> ...
>> FYI, this seems a sane approach to me....
>> The only nit I have to offer is that I'd like to see more comments in
>> the git Makefile about why this "semi-hack" is needed.
>
> Thanks, everybody.
>
> Please eyeball the below for (hopefully) the last time, to be
> eventually merged to maint-1.7.12, maint-1.8.0 and maint (aka
> maint-1.8.1) branches.
>
> -- >8 --
> From: Jonathan Nieder <jrnieder@gmail.com>
> Date: Wed, 2 Jan 2013 00:25:44 -0800
> Subject: [PATCH] build: do not automatically reconfigure unless configure.ac changed
>
> Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
> configure.ac changes, 2012-07-19), "config.status --recheck" is
> automatically run every time the "configure" script changes. In
> particular, that means the configuration procedure repeats whenever
> the version number changes (since the configure script changes to
> support "./configure --version" and "./configure --help"), making
> bisecting painfully slow.
>
> The intent was to make the reconfiguration process only trigger for
> changes to configure.ac's logic. Tweak the Makefile rule to match
> that intent by depending on configure.ac instead of configure.
>
> Reported-by: Martin von Zweigbergk <martinvonz@gmail.com>
> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
> Reviewed-by: Jeff King <peff@peff.net>
> Reviewed-by: Stefano Lattarini <stefano.lattarini@gmail.com>
> ---
> Makefile | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 26b697d..2f5e2ab 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2167,8 +2167,14 @@ configure: configure.ac GIT-VERSION-FILE
> $(RM) $<+
>
> ifdef AUTOCONFIGURED
> -config.status: configure
> - $(QUIET_GEN)if test -f config.status; then \
> +# We avoid depending on 'configure' here, because it gets rebuilt
> +# every time GIT-VERSION-FILE is modified, only to update the embedded
> +# version number string, which config.status does not care about.
>
Alas, config.status *do* care about it, in that the '@PACKAGE_VERSION@',
'@PACKAGE_STRING@' and '@DEFS@' substitutions are affected by what is
hard-coded in configure as the version number [1]. But if we do not
use those substitutions in any of our files (and I believe we don't),
then *we* can happily not care about the configure embedded version
number string, and thus avoid the extra configure runs. Phew.
[1] Yes, this is a mess. We know. Sorry!
> +# We
> +# do want to recheck when the platform/environment detection logic
> +# changes, hence this depends on configure.ac.
> +config.status: configure.ac
> + $(QUIET_GEN)$(MAKE) configure && \
> + if test -f config.status; then \
> ./config.status --recheck; \
> else \
> ./configure; \
HTH,
Stefano
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 19:35 ` Stefano Lattarini
@ 2013-01-02 20:25 ` Junio C Hamano
2013-01-02 20:53 ` Stefano Lattarini
0 siblings, 1 reply; 13+ messages in thread
From: Junio C Hamano @ 2013-01-02 20:25 UTC (permalink / raw)
To: Stefano Lattarini; +Cc: Jonathan Nieder, Jeff King, Martin von Zweigbergk, git
Stefano Lattarini <stefano.lattarini@gmail.com> writes:
>> ifdef AUTOCONFIGURED
>> -config.status: configure
>> - $(QUIET_GEN)if test -f config.status; then \
>> +# We avoid depending on 'configure' here, because it gets rebuilt
>> +# every time GIT-VERSION-FILE is modified, only to update the embedded
>> +# version number string, which config.status does not care about.
>>
> Alas, config.status *do* care about it, in that the '@PACKAGE_VERSION@',
> '@PACKAGE_STRING@' and '@DEFS@' substitutions are affected by what is
> hard-coded in configure as the version number [1]. But if we do not
> use those substitutions in any of our files (and I believe we don't),
> then *we* can happily not care about the configure embedded version
> number string, and thus avoid the extra configure runs. Phew.
>
> [1] Yes, this is a mess. We know. Sorry!
Heh. Should we warn against the use of these symbols somewhere in
configure.ac, perhaps, then?
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 20:25 ` Junio C Hamano
@ 2013-01-02 20:53 ` Stefano Lattarini
0 siblings, 0 replies; 13+ messages in thread
From: Stefano Lattarini @ 2013-01-02 20:53 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jonathan Nieder, Jeff King, Martin von Zweigbergk, git
On 01/02/2013 09:25 PM, Junio C Hamano wrote:
> Stefano Lattarini <stefano.lattarini@gmail.com> writes:
>
>>> ifdef AUTOCONFIGURED
>>> -config.status: configure
>>> - $(QUIET_GEN)if test -f config.status; then \
>>> +# We avoid depending on 'configure' here, because it gets rebuilt
>>> +# every time GIT-VERSION-FILE is modified, only to update the embedded
>>> +# version number string, which config.status does not care about.
>>>
>> Alas, config.status *do* care about it, in that the '@PACKAGE_VERSION@',
>> '@PACKAGE_STRING@' and '@DEFS@' substitutions are affected by what is
>> hard-coded in configure as the version number [1]. But if we do not
>> use those substitutions in any of our files (and I believe we don't),
>> then *we* can happily not care about the configure embedded version
>> number string, and thus avoid the extra configure runs. Phew.
>>
>> [1] Yes, this is a mess. We know. Sorry!
>
> Heh. Should we warn against the use of these symbols somewhere in
> configure.ac, perhaps, then?
>
Actually, they should be checked against in files processed by
'config.status', i.e., files listed in AC_CONFIG_FILES calls in
'configure.ac'. But I honestly believe that would be overkill;
I say we simply adjust your comment to read something like:
# We avoid depending on 'configure' here, because it gets rebuilt
# every time GIT-VERSION-FILE is modified, only to update the
# embedded version number string, which we however do not
# substitute in any file processed by config.status.
Thanks,
Stefano
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH v2] build: do not automatically reconfigure unless configure.ac changed
2013-01-02 8:25 ` [PATCH v2] build: do not automatically reconfigure unless configure.ac changed Jonathan Nieder
2013-01-02 8:38 ` Jeff King
@ 2013-01-02 8:42 ` Jonathan Nieder
1 sibling, 0 replies; 13+ messages in thread
From: Jonathan Nieder @ 2013-01-02 8:42 UTC (permalink / raw)
To: Martin von Zweigbergk; +Cc: Stefano Lattarini, Jeff King, git, Junio C Hamano
Jonathan Nieder wrote:
> Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
> configure.ac changes, 2012-07-19), configure is automatically run
> every time the "configure" script changes. In particular, that
> means configure is automatically rerun whenever the version number
> changes (which changes the configure script to support "./configure
> --helpe")
Gah, I sent the log commit message --- the patch description from v1
is the right one. Sorry for the trouble. Here is the fixed
description again.
Subject: build: do not automatically reconfigure unless configure.ac changed
Starting with v1.7.12-rc0~4^2 (build: reconfigure automatically if
configure.ac changes, 2012-07-19), "config.status --recheck" is
automatically run every time the "configure" script changes. In
particular, that means the configuration procedure repeats whenever
the version number changes (since the configure script changes to
support "./configure --version" and "./configure --help"), making
bisecting painfully slow.
The intent was to make the reconfiguration process only trigger for
changes to configure.ac's logic. Tweak the Makefile rule to match
that intent by depending on configure.ac instead of configure.
Reported-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2013-01-02 20:54 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-02 1:11 Makefile dependency from 'configure' to 'GIT-VERSION-FILE' Martin von Zweigbergk
2013-01-02 7:21 ` Jonathan Nieder
2013-01-02 7:47 ` Martin von Zweigbergk
2013-01-02 8:25 ` [PATCH v2] build: do not automatically reconfigure unless configure.ac changed Jonathan Nieder
2013-01-02 8:38 ` Jeff King
2013-01-02 8:48 ` Jonathan Nieder
2013-01-02 14:13 ` Stefano Lattarini
2013-01-02 16:50 ` Junio C Hamano
2013-01-02 17:07 ` Martin von Zweigbergk
2013-01-02 19:35 ` Stefano Lattarini
2013-01-02 20:25 ` Junio C Hamano
2013-01-02 20:53 ` Stefano Lattarini
2013-01-02 8:42 ` Jonathan Nieder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).