From 3eeca9f7818837ac866bfbce0ee08e5c0181529d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 22 Nov 2017 00:23:50 +0100 Subject: use printf to generate version.h --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 29c1b4b..0e309e9 100644 --- a/Makefile +++ b/Makefile @@ -61,9 +61,7 @@ cqrlogo.fcgi.static: lib/libcqrlogo.o cqrlogo.c cqrlogo.h config.h version.h $(CC) $(CFLAGSSTATIC) -Ilib/ -lfcgi $(LDFLAGS) -DHAVE_FCGI=1 -o cqrlogo.fcgi.static cqrlogo.c lib/libcqrlogo.o 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}) > $@ config.h: config.def.h $(CP) config.def.h config.h -- cgit v1.2.3-70-g09d2