From 0126b159bfa33dc080bba9bd74f59a7a05c0f35e Mon Sep 17 00:00:00 2001 From: Priit Laes Date: Fri, 14 Aug 2026 00:24:25 +0300 Subject: [PATCH] build: Make create_build_dir PHONY and add order-only deps Mark create_build_dir as PHONY so directory creation is never skipped. Also add html_data.h as order-only prerequisite to the .c pattern rule, fixing another the race where httpd/httpd.c and httpd/page_impl.c are compiled before the generated header exists. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 996a19d..71f3d6e 100644 --- a/Makefile +++ b/Makefile @@ -110,10 +110,10 @@ distclean: -rm -f html_data.c html_data.h $(VERSION_HEADER) -rm -rf $(BUILDDIR) -$(BUILDDIR)/%.rel: %.c +$(BUILDDIR)/%.rel: %.c | create_build_dir html_data.h $(CC) -MMD $(CC_FLAGS) -o $@ -c $< -$(BUILDDIR)/%.rel: %.asm +$(BUILDDIR)/%.rel: %.asm | create_build_dir ${ASM} ${AFLAGS} -o $@ $< # mv -f $(addprefix $(basename $^), .lst .rel .sym) . @@ -132,7 +132,7 @@ $(BUILDDIR)/rtlplayground-$(FILENAME_EXTENSION).bin: $(BUILDDIR)/rtlplayground.i tools/output/crc_calculator -u $@ ln -sf $(MACHINE)/rtlplayground-$(FILENAME_EXTENSION).bin output/rtlplayground.bin -.PHONY: clean all $(SUBDIRS) $(VERSION_HEADER) +.PHONY: clean all $(SUBDIRS) $(VERSION_HEADER) create_build_dir .PHONY: machine_check: