# HG changeset patch # User Mike Miller # Date 1523467696 25200 # Node ID ec119a613e3bd5fb46e7824f2a3cdc7de1ef7084 # Parent 078abe2f7a44bcf08aeccb2e5af018213f95375e 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. diff -r 078abe2f7a44 -r ec119a613e3b Makefile.am --- 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