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 /Makefile.am | |
| 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 'Makefile.am')
| -rw-r--r-- | Makefile.am | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am index 7af88b29886..5f0809ee007 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -954,9 +954,31 @@ guix-binary.%.tar.xz: | |||
| 954 | cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" | 954 | cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@" |
| 955 | 955 | ||
| 956 | 956 | ||
| 957 | # The dependency on doc-pot-update is to generate the .pot files, which are | 957 | # Assert that Autotools cache is up to date with Git, by checking |
| 958 | # not checked in. | 958 | # PACKAGE_VERSION against HEAD. Indented to get past Automake. |
| 959 | dist: doc-pot-update | 959 | ifeq ($(MAKECMDGOALS),dist) |
| 960 | git_version = $(shell build-aux/git-version-gen .tarball-version) | ||
| 961 | ifneq ($(PACKAGE_VERSION),$(git_version)) | ||
| 962 | $(warning Autotools cache out of date.) | ||
| 963 | $(info Autotools cache version: $(PACKAGE_VERSION).) | ||
| 964 | $(info Git version: $(git_version).) | ||
| 965 | $(info Please run ./bootstrap && ./configure $(DIST_CONFIGURE_FLAGS)) | ||
| 966 | ifneq ($(GUIX_ALLOW_IRREPRODUCIBLE_TARBALL),yes) | ||
| 967 | $(error Cannot create reproducible tarball) | ||
| 968 | else | ||
| 969 | $(warning Tarball will be irreproducible; distdir will not get removed!) | ||
| 970 | endif | ||
| 971 | endif | ||
| 972 | endif | ||
| 973 | |||
| 974 | # The dependency on dist-doc-pot-update is to clean possibly stale doc and po | ||
| 975 | # files and only then generate the .pot files, which are not checked in. | ||
| 976 | dist: dist-doc-pot-update | ||
| 977 | dist-doc-pot-update: auto-clean | ||
| 978 | $(MAKE) guile$(EXEEXT) | ||
| 979 | $(MAKE) -C po/guix all | ||
| 980 | $(MAKE) -C po/packages all | ||
| 981 | $(MAKE) doc-pot-update | ||
| 960 | 982 | ||
| 961 | dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version | 983 | dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version |
| 962 | dist-hook: assert-no-store-file-names | 984 | dist-hook: assert-no-store-file-names |
