Mercurial > octave
diff Makefile.am @ 25212:ec119a613e3b stable
build: require a clean hg state for make dist
* Makefile.am (hg-id-dist-hook): Raise an error if the hg id shows that the
working tree is not committed. (DIST_IGNORE_HG_STATE): Allow the user to
override the condition.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 11 Apr 2018 10:28:16 -0700 |
parents | 6652d3823428 |
children | 26070f36f1e7 |
line wrap: on
line diff
--- a/Makefile.am Wed Apr 11 10:05:37 2018 -0700 +++ b/Makefile.am Wed Apr 11 10:28:16 2018 -0700 @@ -244,6 +244,13 @@ if AMCOND_ENABLE_HG_ID hg-id-dist-hook: + @test x"$(DIST_IGNORE_HG_STATE)" != x \ + || echo $(HG_ID_VAR) | $(GREP) '^[0-9a-f]\{12\}$$' >/dev/null 2>&1 \ + || { echo ; \ + echo "Packaging distribution requires a clean hg working tree with no uncommitted changes." ; \ + echo "Please commit or revert your changes first, or pass DIST_IGNORE_HG_STATE=1." ; \ + echo "Cannot package distribution!" ; \ + echo ; exit 1; } else hg-id-dist-hook: @echo "WARNING: Octave was configured with --disable-hg-id" 1>&2