Use printf in place of echo for portability to Mac OS.

Update author
This commit is contained in:
Mike Brady
2022-08-08 09:56:25 +01:00
parent 3cc1ec6abc
commit 1f82109577
+4 -4
View File
@@ -36,11 +36,11 @@ endif
if USE_GIT_VERSION
common.c: gitversion.h
gitversion.h: .git/index
echo "// Do not edit!" > gitversion.h
echo "// This file is automatically generated by 'git describe --dirty', if available." >> gitversion.h
echo -n " char git_version_string[] = \"" >> gitversion.h
printf "// Do not edit!\n" > gitversion.h
printf "// This file is automatically generated by 'git describe --dirty', if available.\n" >> gitversion.h
printf " char git_version_string[] = \"" >> gitversion.h
git describe --dirty | tr -d '[[:space:]]' >> gitversion.h
echo "\";" >> gitversion.h
printf "\";\n" >> gitversion.h
CLEANFILES += gitversion.h
endif