"make dist" produces a tarball that contains config.h

Bruno Haible via discussion of the GNU roff typesetting system and related software <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <8181456.aoefvbuG5b@cagnes>
When run in an non-VPATH build ($(builddir) = $(srcdir)), "make dist"
produces a tarball that contains src/include/config.h. But that is a
platform-dependent generated file.

How to reproduce: In a git checkout do
$ ./configure --enable-maintainer-mode && make && make dist

This patch fixes it.
0001-build-Fix-make-dist-to-not-include-config.h-in-the-t.patch (text/x-patch, 763 B)
From 9457d0c76e95ebe57c807139b958935f42746565 Mon Sep 17 00:00:00 2001
From: Bruno Haible <[email protected]>
Date: Wed, 5 Aug 2026 18:35:31 +0200
Subject: [PATCH] build: Fix "make dist" to not include config.h in the
 tarball.

* src/include/include.am (dist_include): Remove config.h from
$(distdir)/src/include/.
---
 src/include/include.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/include/include.am b/src/include/include.am
index 629fa7255..1376a23e1 100644
--- a/src/include/include.am
+++ b/src/include/include.am
@@ -35,6 +35,7 @@ dist-hook: dist_include
 dist_include:
 	chmod u+w $(distdir)/src/include
 	cp -f $(top_srcdir)/src/include/*.h $(distdir)/src/include
+	rm -f $(distdir)/src/include/config.h
 
 
 # Local Variables:
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.