From ba83f1c9c67b25e229b0c763e3295e7418507703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Mon, 23 Apr 2018 14:19:13 +0200 Subject: [PATCH] Makefile.include: set RIOTBUILD_CONFIG_HEADER_C as BUILDDEPS Use BUILDDEPS to define the RIOTBUILD_CONFIG_HEADER_C dependency --- Makefile.include | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile.include b/Makefile.include index 449b8c61dd..cb15c63723 100644 --- a/Makefile.include +++ b/Makefile.include @@ -364,6 +364,9 @@ LINKFLAGPREFIX ?= -Wl, DIRS += $(EXTERNAL_MODULE_DIRS) +# Define dependencies required for building (headers, downloading source files,) +BUILDDEPS += $(RIOTBUILD_CONFIG_HEADER_C) + # Save value to verify it is not modified later _BASELIBS_VALUE_BEFORE_USAGE := $(BASELIBS) @@ -387,7 +390,7 @@ endif # RIOTNOLINK $(ELFFILE): $(BASELIBS) $(Q)$(_LINK) -o $@ -$(BINDIR)/$(APPLICATION_MODULE).a: $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS) $(BUILDDEPS) +$(BINDIR)/$(APPLICATION_MODULE).a: $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS) $(BUILDDEPS) $(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk $(BINDIR)/$(APPLICATION_MODULE).a: FORCE @@ -425,14 +428,14 @@ endef # The `clean` needs to be serialized before everything else. ifneq (, $(filter clean, $(MAKECMDGOALS))) - all $(BASELIBS) $(USEPKG:%=$(RIOTPKG)/%/Makefile.include) $(RIOTBUILD_CONFIG_HEADER_C) pkg-prepare $(BUILDDEPS): clean + all $(BASELIBS) $(USEPKG:%=$(RIOTPKG)/%/Makefile.include) pkg-prepare $(BUILDDEPS): clean endif .PHONY: pkg-prepare $(USEPKG:%=$(BINDIR)/%.a) pkg-prepare: -@for i in $(USEPKG) ; do "$(MAKE)" -C $(RIOTPKG)/$$i prepare ; done -$(USEPKG:%=$(BINDIR)/%.a): $(RIOTBUILD_CONFIG_HEADER_C) pkg-prepare $(BUILDDEPS) +$(USEPKG:%=$(BINDIR)/%.a): pkg-prepare $(BUILDDEPS) @mkdir -p $(BINDIR) $(QQ)"$(MAKE)" -C $(RIOTPKG)/$(patsubst $(BINDIR)/%.a,%,$@)