Fix makefile to work without git installed

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

[trivial D1] Fix makefile to work without git installed