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