diff options
author | Christian Hesse <mail@eworm.de> | 2017-11-22 00:24:51 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2017-11-22 00:24:51 +0100 |
commit | 6d2fb6711872287946fe67d8e4974313c9f8602f (patch) | |
tree | 8fd49b55947ff98bb751422087cb9b18c902a342 /Makefile | |
parent | 647dd4809e595c12192e8902d1a31cbee077bbe1 (diff) | |
download | dyndhcpd-6d2fb6711872287946fe67d8e4974313c9f8602f.tar.gz dyndhcpd-6d2fb6711872287946fe67d8e4974313c9f8602f.tar.zst |
use printf to generate version.h
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -21,9 +21,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}) > $@ dyndhcpd: dyndhcpd.c dyndhcpd.h config.h version.h $(CC) $(CFLAGS) $(LDFLAGS) -o dyndhcpd dyndhcpd.c |