Fix makefile to work without git installed

While we are at it, use printf instead of echo.
Merge pull request #1786 from leandro-lucarella-sociomantic/fix-devel-version

[trivial] Fix makefile to work without git installed