summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2017-11-22 00:26:40 +0100
committerGravatar Christian Hesse <mail@eworm.de>2017-11-22 00:26:40 +0100
commit682fa6b9b65008371b9625ca7ac9ee0f4de003b2 (patch)
tree8132106da49d2a4d5818529b13ddfe65e586693d
parent07b1ecf04f901d62e7d6a54b204e430452124d0e (diff)
downloadmpd-notification-682fa6b9b65008371b9625ca7ac9ee0f4de003b2.tar.gz
mpd-notification-682fa6b9b65008371b9625ca7ac9ee0f4de003b2.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 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