summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am28
-rw-r--r--doc/local.mk35
2 files changed, 60 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.
959dist: 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.
976dist: dist-doc-pot-update
977dist-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
961dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version 983dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
962dist-hook: assert-no-store-file-names 984dist-hook: assert-no-store-file-names
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
295DIST_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.
301auto-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.
323doc-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