From 682fa6b9b65008371b9625ca7ac9ee0f4de003b2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 22 Nov 2017 00:26:40 +0100 Subject: use printf to generate version.h --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 967cafa..ba51b33 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,7 @@ config.h: $(CP) config.def.h config.h version.h: $(wildcard .git/HEAD .git/index .git/refs/tags/*) Makefile - echo "#ifndef VERSION" > $@ - echo "#define VERSION \"$(shell git describe --long 2>/dev/null || echo ${VERSION})\"" >> $@ - echo "#endif" >> $@ + printf "#ifndef VERSION\n#define VERSION \"%s\"\n#endif\n" $(shell git describe --long 2>/dev/null || echo ${VERSION}) > $@ README.html: README.md $(MD) README.md > README.html -- cgit v1.2.3-54-g00ecf