bug-groff
[Top][All Lists]
Advanced

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

[bug #61052] .version file not updated as aggressively as it should be


From: G. Branden Robinson
Subject: [bug #61052] .version file not updated as aggressively as it should be
Date: Sat, 21 Aug 2021 00:26:41 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #5, bug #61052 (project groff):

I think I have it now.  "make distcheck" works fine.


diff --git a/Makefile.am b/Makefile.am
index a6b016dc..9be78af9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -922,8 +922,17 @@ SUFFIXES += .man
 # Version files - see script 'build-aux/git-gen-version'
 EXTRA_DIST += $(top_srcdir)/.version
 BUILT_SOURCES += $(top_srcdir)/.version
-$(top_srcdir)/.version:
-       echo $(VERSION) > $@-t && mv $@-t $@
+# Regenerate a temporary version string file on every build, but update
+# the real version file's mtime only if its contents change.
+.PHONY: .version.tree
+.version.tree:
+       test -f $(distdir)/.tarball-verion || echo $(VERSION) > $@
+$(top_srcdir)/.version: .version.tree
+       if ! test -f $(distdir)/.tarball-version; then \
+         test -f $@ || cp .version.tree $@; \
+         cmp -s .version.tree $@ || cp .version.tree $@; \
+       fi
+MOSTLYCLEANFILES += .version.tree
 dist-hook:
        echo $(VERSION) > $(distdir)/.tarball-version


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61052>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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