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

Reviews 728 and 729 by @mlucy
Closes #1162
Closes #1161