Gary V. Vaughan wrote:
Replacing the $(...) with back ticks fixes the parse problem for me, though I'm not sure whether it's the odd looking dangling `|| exit 1` or the POSIX command substitution paren matching interacting badly with nested `cd $(srcdir)`?
Neither sounds plausible, so I'm afraid it's another bug in your 'make' implementation or something like that. I'd rathar understand what the real bug is before slapping on a patch like that. What happens if you put that text: if test -d ./.git \ && git --version >/dev/null 2>&1; then \ diff=$(cd . && git submodule -q foreach \ git diff-index --name-only HEAD) \ || exit 1; \ case $diff in '') ;; \ *) echo 'maint.mk: submodule files are locally modified:'; \ echo "$diff"; exit 1;; esac; \ else \ : ; \ fi into a file "FOO" and then type "bash -x ./FOO"? That doesn't give me a syntax error; does it give you one? If so, what? And if not, then why not, since that's what 'make' says it's running?