[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix dependence on computed configure variables.

From: Joel E. Denny
Subject: Re: [PATCH] Fix dependence on computed configure variables.
Date: Sat, 2 Aug 2008 02:59:37 -0400 (EDT)

On Sun, 27 Jul 2008, Joel E. Denny wrote:

> Maybe the top-level Makefile.am should declare .version to depend on 
> configure so they don't get out of sync.

I'm considering pushing the following patch to Bison.  I'll wait a little 
for comments because this area seems a little controversial.

By the way, I can't seem to find any documentation that explains the 
difference between VERSION and PACKAGE_VERSION.  Sorry if I've missed it.  
Is VERSION just the old name for PACKAGE_VERSION?

>From d7106a1232c8fe829326b77ec7e74c27cf4ed472 Mon Sep 17 00:00:00 2001
From: Joel E. Denny <address@hidden>
Date: Sat, 2 Aug 2008 02:52:22 -0400
Subject: [PATCH] Keep .version and PACKAGE_VERSION in sync.

* Makefile.am ($(top_srcdir)/.version): Declare configure as a
dependency, and add comments justifying this in more detail.  Discussed
starting at

diff --git a/Makefile.am b/Makefile.am
index 7113484..4aa284b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -43,9 +43,17 @@ maintainer-push-check:
        cd tests && $(MAKE) $(AM_MAKEFLAGS) $@
-# See comments in build-aux/git-version-gen.
+# See comments in build-aux/git-version-gen.  However, we make .version depend
+# on configure so that .version and VERSION/PACKAGE_VERSION stay in sync in the
+# working copy (for example, when you run autoreconf && make).  Allowing these
+# to fall out of sync appears to have little potential to improve Bison build
+# efficiency (even if we were to replace VERSION/PACKAGE_VERSION with .version
+# everywhere).  On the other hand, it could be harmful.  For example, a
+# developer might naively reference .version in a test case while the bison
+# executable still compiles with VERSION, and so the test case might fail or
+# pass incorrectly.
 BUILT_SOURCES = $(top_srcdir)/.version
+$(top_srcdir)/.version: configure
        echo $(VERSION) > address@hidden && mv address@hidden $@
        echo $(VERSION) > $(distdir)/.tarball-version

reply via email to

[Prev in Thread] Current Thread [Next in Thread]