From: Ruben Kerkhof Date: Sun, 4 Jan 2015 15:54:40 +0000 (+0100) Subject: Fix the same race in recursor Makefile X-Git-Tag: rec-3.7.0-rc1~67^2~5^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2039%2Fhead;p=thirdparty%2Fpdns.git Fix the same race in recursor Makefile --- 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