From 9f2d6b72b7995d3559552661534068c6dcbc33f2 Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Fri, 14 Aug 2026 00:11:50 +0300 Subject: [PATCH] build: Fix version.h race condition in parallel builds --- Makefile | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9ab0da8..c59c0b7 100644 --- a/Makefile +++ b/Makefile @@ -92,11 +92,10 @@ html_data.c html_data.h: $(HTML) tools/output/fileadder tools/output/fileadder -a $(HTML_LOCATION) -s $(IMAGESIZE) -b BANK1 -d html -p html_data $(VERSION_HEADER): - @echo "#ifndef VERSION_H" > $(VERSION_HEADER) - @echo "#define VERSION_H" >> $(VERSION_HEADER) - @echo "#define VERSION_SW \"$(VERSION_EXTENSION)\"" >> $(VERSION_HEADER) - @echo "#define BUILD_DATE \"$(BUILD_DATE)\"" >> $(VERSION_HEADER) - @echo "#endif" >> $(VERSION_HEADER) + @printf '%s\n' "#ifndef VERSION_H" "#define VERSION_H" \ + "#define VERSION_SW \"$(VERSION_EXTENSION)\"" \ + "#define BUILD_DATE \"$(BUILD_DATE)\"" \ + "#endif" > $(VERSION_HEADER) httpd: html_data.h