Follow-up Comment #4, bug #67933 (group groff):

Hi Collin,

At 2026-01-19T13:44:41-0500, Collin Funk wrote:
> Follow-up Comment #3, bug #67933 (group groff):
>
> Perhaps the following lines from GNU time's Makefile.am will help you:
>
> BUILT_SOURCES = .version
> .version:
> $(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
>
> dist-hook: gen-ChangeLog
> $(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version

We had something similar already, put in by Bertrand in 2017-2018 or
longer ago.

Here's my proposed diff.


diff --git a/ChangeLog b/ChangeLog
index 7cafee4cc..1713e3ff0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-01-19  G. Branden Robinson <[email protected]>
+
+       * Makefile.am: Stop adding ".version" file to the `EXTRA_DIST`
+       and `BUILT_SOURCES` macros.
+       (dist-hook): Delete the ".version" file prior to preparing
+       ".tarball-version"; they are mutually exclusive and the former
+       should not ship in the distribution archive.
+
+       Fixes <https://savannah.gnu.org/bugs/?67927>.  Thanks to Colin
+       Watson for the report.
+
 2026-01-18  G. Branden Robinson <[email protected]>

        [gropdf]: Regression-test Savannah #67927.
diff --git a/Makefile.am b/Makefile.am
index db9362e43..6bf432ec4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -870,11 +870,12 @@ SUFFIXES += .man
> $@

 # Version files - see script "build-aux/git-version-gen".
-EXTRA_DIST += $(top_srcdir)/.version
-BUILT_SOURCES += $(top_srcdir)/.version
+#EXTRA_DIST += $(top_srcdir)/.version
+#BUILT_SOURCES += $(top_srcdir)/.version
 $(top_srcdir)/.version:
        echo $(VERSION) > $@-t && mv $@-t $@
 dist-hook:
+       $(RM) $(top_srcdir)/.version
        echo $(VERSION) > $(distdir)/.tarball-version

 # maintainer-mode targets


You're better with the Autotools than I am--does that look sane?

I don't recollect the meaning of `BUILT_SOURCES`, and was going to look
it up after testing this.



    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to