Add check-syntx rule for flymake and fix phony-list.mk

Reviews 728 and 729 by @mlucy
Closes #1162
Closes #1161
Merge branch 'next' into sam_939_alt