diff options
| author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2023-09-08 10:46:30 +0200 |
|---|---|---|
| committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-04-14 10:29:11 +0200 |
| commit | 416f11f1d4b2e12d8db2687e753d760f148cfc2d (patch) | |
| tree | 0c875d2d5caa0de696df1a650c34b66af93da254 /doc/local.mk | |
| parent | 3d8d0642da5e5982e17122ab35774f9d5dfca79b (diff) | |
maint: Ensure generated file reproducibility for dist.
* doc/local.mk (doc-clean): New target.
(DIST_CONFIGURE_FLAGS): New variable.
(auto-clean): Use them in new target.
* Makefile.am (dist-doc-pot-update): Use it in new target.
(dist): Change to depend on it to clean possibly stale files, instead of
doc-pot-update directly.
Add a toplevel check to ensure that Autotools cache is up to date.
Change-Id: I2ff2d88db9fe1e708ab65e33e1f3d7ecee882cb4
Diffstat (limited to 'doc/local.mk')
| -rw-r--r-- | doc/local.mk | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/local.mk b/doc/local.mk index d18cdf3e5fa..130f40ece99 100644 --- a/doc/local.mk +++ b/doc/local.mk | |||
| @@ -291,3 +291,38 @@ $(eval $(call version.texi-from-git,vti,doc/guix.texi,)) | |||
| 291 | $(foreach lang, $(MANUAL_LANGUAGES), \ | 291 | $(foreach lang, $(MANUAL_LANGUAGES), \ |
| 292 | $(eval i=$(shell echo $$(($(i)+1)))) \ | 292 | $(eval i=$(shell echo $$(($(i)+1)))) \ |
| 293 | $(eval $(call version.texi-from-git,$(i),po/doc/guix-manual.$(lang).po,-$(lang)))) | 293 | $(eval $(call version.texi-from-git,$(i),po/doc/guix-manual.$(lang).po,-$(lang)))) |
| 294 | |||
| 295 | DIST_CONFIGURE_FLAGS = \ | ||
| 296 | --localstatedir=/var \ | ||
| 297 | --sysconfdir=/etc | ||
| 298 | |||
| 299 | # Delete all Autotools-generated files and rerun configure to ensure | ||
| 300 | # a clean cache and distributing reproducible versions. | ||
| 301 | auto-clean: maintainer-clean-vti doc-clean | ||
| 302 | rm -f ABOUT-NLS INSTALL | ||
| 303 | rm -f aclocal.m4 configure libtool Makefile.in | ||
| 304 | if test -e .git; then \ | ||
| 305 | git clean -fdx -- '.am*' build-aux m4 po; \ | ||
| 306 | else \ | ||
| 307 | rm -rf .am*; \ | ||
| 308 | $(MAKE) -C po/guix maintainer-clean; \ | ||
| 309 | $(MAKE) -C po/packages maintainer-clean; \ | ||
| 310 | fi | ||
| 311 | rm -f guile | ||
| 312 | rm -f guix-daemon nix/nix-daemon/guix_daemon-guix-daemon.o | ||
| 313 | # Automake fails if guix-cookbook-LANG.texi stubs are missing; running | ||
| 314 | # autoreconf -vif is not enough. | ||
| 315 | ./bootstrap | ||
| 316 | # The dependency chain for the guix-cookbook-LANG.texi was cut on purpose; | ||
| 317 | # they must be deleted to ensure a rebuild. | ||
| 318 | rm -f $(filter-out %D%/guix.texi %D%/guix-cookbook.texi, $(info_TEXINFOS)) | ||
| 319 | ./configure $(DIST_CONFIGURE_FLAGS) | ||
| 320 | |||
| 321 | # Delete all generated doc files to ensure a clean cache and distributing | ||
| 322 | # reproducible versions. | ||
| 323 | doc-clean: | ||
| 324 | rm -f $(srcdir)/doc/*.1 | ||
| 325 | rm -f $(srcdir)/doc/stamp* | ||
| 326 | rm -f $(DOT_FILES:%.dot=%.png) | ||
| 327 | rm -f $(DOT_VECTOR_GRAPHICS) | ||
| 328 | rm -f doc/images/coreutils-size-map.eps | ||
