[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: |
Fri, 20 Aug 2021 21:04:20 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
Update of bug #61052 (project groff):
Summary: Different version in "nroff" from that in "groff" =>
.version file not updated as aggressively as it should be
_______________________________________________________
Follow-up Comment #3:
I got it working. Current patch.
diff --git a/Makefile.am b/Makefile.am
index a6b016dc..eb01f935 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -922,8 +922,15 @@ 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: $(top_srcdir)/.version.tmp
+$(top_srcdir)/.version.tmp:
+ echo $(VERSION) > $@
+$(top_srcdir)/.version: $(top_srcdir)/.version.tmp
+ test -f $@ || cp $@.tmp $@
+ cmp -s $@.tmp $@ || mv $@.tmp $@
+ $(RM) -f $@.tmp
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/