Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

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

From: Martin von Zweigbergk <hidden>
Date: 2016-06-15 22:55:38

On Tue, Jan 1, 2013 at 11:21 PM, Jonathan Nieder [off-list ref] wrote:
How about this patch (untested)?
Looks good. Thanks!
quoted
--- 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
[...]
quoted
--- 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 :-(
quoted hunk ↗ jump to hunk
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help