Makefile: do not check submodules if no .git dir