Merge branch 'jn/less-reconfigure' into maint
authorJunio C Hamano <gitster@pobox.com>
Sat, 12 Jan 2013 00:48:03 +0000 (16:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sat, 12 Jan 2013 00:48:03 +0000 (16:48 -0800)
When autoconf is used, any build on a different commit always ran
"config.status --recheck" even when unnecessary.

* jn/less-reconfigure:
build: do not automatically reconfigure unless configure.ac changed

Makefile
index 18023294d2fd698f53fcb436e6998ae3d17a3327..3030e1a824606074691b7248f8e455b6c1aeeda3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2275,8 +2275,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; \