Fix up checks in Makefile and make them portable #1661
+78
−9
Merged
8000