build: do not automatically reconfigure unless configure.ac changed
[gitweb.git] / Makefile
index 26b697d1756dac4f37e04b8857ca9ea15df7d18d..8dc2dbc2eeae18b67a5af5322e5c86c8bb102c18 100644 (file)
--- 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; \