Makefile: do not check submodules if no .git dir
Merge pull request #700 from alexeymuranov/improve-makefile

Improve Makefile: do not check submodules if not in a .git repository