diff options
author | Christian Hesse <mail@eworm.de> | 2017-11-22 00:23:50 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-11-22 00:23:50 +0100 |
commit | 3eeca9f7818837ac866bfbce0ee08e5c0181529d (patch) | |
tree | 369a4502540cfafc21db543970df0bdb5a81a117 /Makefile | |
parent | e099f9fdf925b8c4522bba817807a2a9124c2b0a (diff) | |
download | cqrlogo-3eeca9f7818837ac866bfbce0ee08e5c0181529d.tar.gz cqrlogo-3eeca9f7818837ac866bfbce0ee08e5c0181529d.tar.zst |
use printf to generate version.h
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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 |