[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproduc
From: |
Ludovic Courtès |
Subject: |
[bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly. |
Date: |
Wed, 03 Apr 2024 22:25:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
> +# Define a rule to build `version[LANG].texi' reproducibly using metadata
> from
> +# Git rather than using metadata from the filesystem.
> +define version.texi-from-git
> +override $(srcdir)/doc/stamp-$(1): $(srcdir)/$(2) $(top_srcdir)/configure
> + $$(AM_V_GEN)set -e \
> + export LC_ALL=C; \
> + export TZ=UTC0; \
> + timestamp=$$$$(git log --pretty=format:%ct -n1 -- $$< \
> + 2>/dev/null \
> + || echo $$(SOURCE_DATE_EPOCH)) \
> + dmy=$$$$(date --date="@$$$$timestamp" "+%-d %B %Y"); \
> + my=$$$$(date --date="@$$$$timestamp" "+%B %Y"); \
> + { echo "@set UPDATED $$$$dmy"; \
> + echo "@set UPDATED-MONTH $$$$my"; \
> + echo "@set EDITION $$$(VERSION)"; \
> + echo "@set VERSION $$$(VERSION)"; } > $$@-t;
> + mv $$@-t $$@
> + cp -p $$@ $$(srcdir)/doc/version$(3).texi
> +endef
> +
> +i:=0
> +$(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))))
Maybe we could drop ‘i’ and instead create ‘samp-fr’, ‘stamp-de’, and so
on? That is, ‘version.texi-from-git’ would take 2 arguments instead of 3.
(That’s really a minor issue though.)
Ludo’.
- [bug#70169] [PATCH 0/7] Reproducible `make dist' tarball in defiance of Autotools and Gettext, Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 2/7] maint: Use reproducible timestamps and name for tarball., Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 4/7] maint: Help help2man generate reproducible man-pages., Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 1/7] maint: Cater for running `make dist' from a worktree., Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly., Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly.,
Ludovic Courtès <=
- [bug#70169] [PATCH 5/7] maint: Generate 'doc/version-LANG.texi' reproducibly., Ludovic Courtès, 2024/04/03
- [bug#70169] [PATCH 3/7] maint: Generate 'doc/version.texi' reproducibly., Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 7/7] maint: Ensure generated file reproducibility for dist., Janneke Nieuwenhuizen, 2024/04/03
- [bug#70169] [PATCH 6/7] maint: Use reproducible Git timestamp for POT-Creation-Date., Janneke Nieuwenhuizen, 2024/04/03