summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-11-22 00:25:58 +0100
committerGravatar Christian Hesse <mail@eworm.de>2017-11-22 00:25:58 +0100
commitb450bac3676eeb725ef5a0e074175a053de035b6 (patch)
treed5b0e16269507066f461d49ee6a028e79f8d4c34
parent7d82b19cd6f402c1d29a5d1519cad2d0485db84d (diff)
downloadjournal-notify-b450bac3676eeb725ef5a0e074175a053de035b6.tar.gz
journal-notify-b450bac3676eeb725ef5a0e074175a053de035b6.tar.zst
use printf to generate version.h
-rw-r--r--Makefile4
1 files changed, 1 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 206acad..122a0f3 100644
--- a/Makefile
+++ b/Makefile
@@ -26,9 +26,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