From 6d2fb6711872287946fe67d8e4974313c9f8602f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 22 Nov 2017 00:24:51 +0100 Subject: use printf to generate version.h --- Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 395ee84..e934263 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3-70-g09d2