@@ -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