From 406a38f38a6b357eb804a47661dcccec7c659cf6 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 4 Jan 2015 16:54:40 +0100 Subject: [PATCH] Fix the same race in recursor Makefile --- pdns/Makefile-recursor | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pdns/Makefile-recursor b/pdns/Makefile-recursor index d1bfcf4267..edd6b8a174 100644 --- a/pdns/Makefile-recursor +++ b/pdns/Makefile-recursor @@ -75,13 +75,19 @@ build_host=$(shell id -u -n)@$(shell hostname -f) .PHONY: version_generated.h version_generated.h: - echo '#ifndef VERSION_GENERATED_H' > $@ - echo '#define VERSION_GENERATED_H' >> $@ - echo '#include "config.h"' >> $@ - echo '#define PDNS_VERSION VERSION' >> $@ - echo '#define BUILD_DATE "$(build_date)"' >> $@ - echo '#define BUILD_HOST "$(build_host)"' >> $@ - echo '#endif //!VERSION_GENERATED_H' >> $@ + @echo "$$create_version_generated_h" > $@ + +define create_version_generated_h +#ifndef VERSION_GENERATED_H +#define VERSION_GENERATED_H +#include "config.h" +#define PDNS_VERSION VERSION +#define BUILD_DATE "$(build_date)" +#define BUILD_HOST "$(build_host)" +#endif //!VERSION_GENERATED_H +endef + +export create_version_generated_h message: @echo -- 2.47.2