diff options
author | Christian Hesse <mail@eworm.de> | 2017-11-22 00:21:10 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-11-22 00:21:10 +0100 |
commit | 329ca2e007deac25bb5f89d5ba8d882b9b01fd70 (patch) | |
tree | 15800681a9735776f7acea3bdfbb0ed3c8be8386 | |
parent | 85568adde12e8f7a20b89e01e568dfdd433d95c7 (diff) | |
download | mkinitcpio-ykfde-329ca2e007deac25bb5f89d5ba8d882b9b01fd70.tar.gz mkinitcpio-ykfde-329ca2e007deac25bb5f89d5ba8d882b9b01fd70.tar.zst |
use printf to generate version.h
-rw-r--r-- | Makefile | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -25,9 +25,7 @@ config.h: config.def.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}) > $@ %.html: %.md $(MD) $< > $@ |