diff mbox series

[bug#70169,7/7] maint: Ensure generated file reproducibility for dist.

Message ID 80a2280ce7a14f1b8770dad24a230a569143d304.1712165977.git.janneke@gnu.org
State New
Headers show
Series Reproducible `make dist' tarball in defiance of Autotools and Gettext | expand

Commit Message

Janneke Nieuwenhuizen April 3, 2024, 7:11 p.m. UTC
* doc/local.mk (override $(srcdir)/doc/stamp-vti): New target override.
(doc-clean, man-clean): New targets.
(auto-clean): Depend on it in new target.
(DIST_CONFIGURE_FLAGS): New variable.
(dist-hook): Use them.

Change-Id: I7b8a3d9ef1e4a4eddb7c329a2c27f481a451b84b
---
 doc/local.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
diff mbox series

Patch

diff --git a/doc/local.mk b/doc/local.mk
index 893c99e1b1..a8e59bb7e6 100644
--- a/doc/local.mk
+++ b/doc/local.mk
@@ -280,3 +280,24 @@  $(eval $(call version.texi-from-git,vti,doc/guix.texi,))
 $(foreach lang, $(MANUAL_LANGUAGES),				\
 	$(eval i=$(shell echo $$(($(i)+1))))			\
 	$(eval $(call version.texi-from-git,$(i),po/doc/guix-manual.$(lang).po,-$(lang))))
+
+DIST_CONFIGURE_FLAGS =				\
+  --localstatedir=/var				\
+  --sysconfdir=/etc
+
+dist: auto-clean
+auto-clean: maintainer-clean-vti doc-clean man-clean
+	rm -f ABOUT-NLS INSTALL
+	rm -f aclocal.m4 configure libtool Makefile.in
+	git clean -fdx -- build-aux
+	./bootstrap
+	./configure $(DIST_CONFIGURE_FLAGS)
+
+doc-clean:
+	rm -f $(srcdir)/doc/stamp*
+	rm -f $(DOT_FILES:%.dot=%.png)
+	rm -f $(filter-out %D%/guix.texi %D%/guix-cookbook.texi, $(info_TEXINFOS))
+	rm -f $(srcdir)/po/doc/*.pot $(srcdir)/po/guix/*.pot $(srcdir)/po/packages/*.pot
+
+man-clean:
+	rm -f $(srcdir)/doc/*.1