maint: Cater for running `make dist' from a tarball.
* Makefile.am: Use in_git_p conditional to disable Autotools' cache consistency assert and removal when bulding from tarball. (dist): Depend on doc-pot-update again when building from tarball. (dist-hook): Remove dependencies on gen-ChangeLog and gen-AUTHORS when building from tarball. (gen-ChangeLog, gen-AUTHORS): Remove guarding for building from tarball. Use set -e to avoid silently failing. (gen-tarball-version): Use $(SOURCE_DATE_EPOCH) instead of re-generating it using git; this also works running from a tarball. Change-Id: I9ebdd28a70837f6a4db610c4816bb283d176e2d9master
parent
f83b5274c8
commit
0cc0cf9367
50
Makefile.am
50
Makefile.am
|
@ -955,6 +955,20 @@ guix-binary.%.tar.xz:
|
||||||
guix` ; \
|
guix` ; \
|
||||||
cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
|
cp "$$tarball" "$@.tmp" ; mv "$@.tmp" "$@"
|
||||||
|
|
||||||
|
# The `dist' target has other dependencies when building from Git
|
||||||
|
# to assert and achieve reproducibility.
|
||||||
|
if in_git_p
|
||||||
|
|
||||||
|
# The dependency on dist-doc-pot-update is to clean possibly stale doc and po
|
||||||
|
# files and only then generate the .pot files, which are not checked in.
|
||||||
|
dist: dist-doc-pot-update
|
||||||
|
dist-doc-pot-update: auto-clean
|
||||||
|
$(MAKE) guile$(EXEEXT)
|
||||||
|
$(MAKE) -C po/guix all
|
||||||
|
$(MAKE) -C po/packages all
|
||||||
|
$(MAKE) doc-pot-update
|
||||||
|
|
||||||
|
dist-hook: gen-ChangeLog gen-AUTHORS
|
||||||
|
|
||||||
# Assert that Autotools cache is up to date with Git, by checking
|
# Assert that Autotools cache is up to date with Git, by checking
|
||||||
# PACKAGE_VERSION against HEAD. Indented to get past Automake.
|
# PACKAGE_VERSION against HEAD. Indented to get past Automake.
|
||||||
|
@ -969,20 +983,20 @@ guix-binary.%.tar.xz:
|
||||||
$(error Cannot create reproducible tarball)
|
$(error Cannot create reproducible tarball)
|
||||||
else
|
else
|
||||||
$(warning Tarball will be irreproducible; distdir will not get removed!)
|
$(warning Tarball will be irreproducible; distdir will not get removed!)
|
||||||
endif
|
endif # !GUIX_ALLOW_IRREPRODUCIBLE_TARBALL
|
||||||
endif
|
endif # PACKAGE_VERSION != git_version
|
||||||
endif
|
endif # MAKECMDGOALS dist
|
||||||
|
|
||||||
# The dependency on dist-doc-pot-update is to clean possibly stale doc and po
|
else # !in_git_p
|
||||||
# files and only then generate the .pot files, which are not checked in.
|
|
||||||
dist: dist-doc-pot-update
|
|
||||||
dist-doc-pot-update: auto-clean
|
|
||||||
$(MAKE) guile$(EXEEXT)
|
|
||||||
$(MAKE) -C po/guix all
|
|
||||||
$(MAKE) -C po/packages all
|
|
||||||
$(MAKE) doc-pot-update
|
|
||||||
|
|
||||||
dist-hook: gen-ChangeLog gen-AUTHORS gen-tarball-version
|
dist: doc-pot-update
|
||||||
|
|
||||||
|
ifeq ($(MAKECMDGOALS),dist)
|
||||||
|
$(warning Not using Git, tarball will likely be irreproducible!)
|
||||||
|
endif # MAKECMDGOALS dist
|
||||||
|
endif # !in_git_p
|
||||||
|
|
||||||
|
dist-hook: gen-tarball-version
|
||||||
dist-hook: assert-no-store-file-names
|
dist-hook: assert-no-store-file-names
|
||||||
|
|
||||||
distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
|
distcheck-hook: assert-binaries-available assert-final-inputs-self-contained
|
||||||
|
@ -994,27 +1008,25 @@ $(top_srcdir)/.version: config.status
|
||||||
|
|
||||||
gen-tarball-version:
|
gen-tarball-version:
|
||||||
echo $(VERSION) > "$(distdir)/.tarball-version"
|
echo $(VERSION) > "$(distdir)/.tarball-version"
|
||||||
git show HEAD --format=%ct --no-patch > $(distdir)/.tarball-timestamp
|
echo $(SOURCE_DATE_EPOCH) > $(distdir)/.tarball-timestamp
|
||||||
|
|
||||||
gen-ChangeLog:
|
gen-ChangeLog:
|
||||||
$(AM_V_GEN)if test -e .git; then \
|
$(AM_V_GEN)set -e; \
|
||||||
export LC_ALL=en_US.UTF-8; \
|
export LC_ALL=en_US.UTF-8; \
|
||||||
export TZ=UTC0; \
|
export TZ=UTC0; \
|
||||||
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
$(top_srcdir)/build-aux/gitlog-to-changelog \
|
||||||
> $(distdir)/ChangeLog.tmp; \
|
> $(distdir)/ChangeLog.tmp; \
|
||||||
rm -f $(distdir)/ChangeLog; \
|
rm -f $(distdir)/ChangeLog; \
|
||||||
mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog; \
|
mv $(distdir)/ChangeLog.tmp $(distdir)/ChangeLog;
|
||||||
fi
|
|
||||||
|
|
||||||
gen-AUTHORS:
|
gen-AUTHORS:
|
||||||
$(AM_V_GEN)if test -e .git; then \
|
$(AM_V_GEN)set -e; \
|
||||||
rm -f "$(distdir)/AUTHORS"; \
|
rm -f "$(distdir)/AUTHORS"; \
|
||||||
export LC_ALL=en_US.UTF-8; \
|
export LC_ALL=en_US.UTF-8; \
|
||||||
export TZ=UTC0; \
|
export TZ=UTC0; \
|
||||||
$(top_builddir)/pre-inst-env "$(GUILE)" \
|
$(top_builddir)/pre-inst-env "$(GUILE)" \
|
||||||
"$(top_srcdir)/build-aux/generate-authors.scm" \
|
"$(top_srcdir)/build-aux/generate-authors.scm" \
|
||||||
"$(top_srcdir)" "$(distdir)/AUTHORS"; \
|
"$(top_srcdir)" "$(distdir)/AUTHORS";
|
||||||
fi
|
|
||||||
|
|
||||||
# Like 'dist', but regenerate 'configure' so we get an up-to-date
|
# Like 'dist', but regenerate 'configure' so we get an up-to-date
|
||||||
# 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to
|
# 'PACKAGE_VERSION' string. (In Gnulib, 'GNUmakefile' has a special trick to
|
||||||
|
|
Reference in New Issue