# HG changeset patch # User Jim Meyering # Date 1241295610 -7200 # Node ID c88193c49cb74cfd00208aa44550458546832736 # Parent b5e930e41a83a1eb525e946190d372d482e43e8f build: ensure that a release build fails when a submodule is unclean * top/maint.mk (no-submodule-changes): New rule. (alpha beta major): Depend on it. diff -r b5e930e41a83 -r c88193c49cb7 ChangeLog --- a/ChangeLog Sat May 02 13:40:19 2009 +0200 +++ b/ChangeLog Sat May 02 22:20:10 2009 +0200 @@ -1,3 +1,9 @@ +2009-05-02 Jim Meyering + + build: ensure that a release build fails when a submodule is unclean + * top/maint.mk (no-submodule-changes): New rule. + (alpha beta major): Depend on it. + 2009-05-02 Bruno Haible Remove incompatibility between modules fnmatch-posix and fnmatch-gnu. diff -r b5e930e41a83 -r c88193c49cb7 top/maint.mk --- a/top/maint.mk Sat May 02 13:40:19 2009 +0200 +++ b/top/maint.mk Sat May 02 22:20:10 2009 +0200 @@ -676,9 +676,21 @@ '* cfg.mk (old_NEWS_hash): Auto-update.' endef +.PHONY: no-submodule-changes +no-submodule-changes: + if test -d .git; then \ + diff=$$(git submodule -q foreach git diff-index --name-only HEAD) \ + || exit 1; \ + case $$diff in '') ;; \ + *) echo '$(ME): submodule files are locally modified:'; \ + echo "$$diff"; exit 1;; esac; \ + else \ + : ; \ + fi + .PHONY: alpha beta major ALL_RECURSIVE_TARGETS += alpha beta major -alpha beta major: $(local-check) writable-files +alpha beta major: $(local-check) writable-files no-submodule-changes test $@ = major \ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \ || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\