[PATCH v4 08/10] build: add .config file to dependencies

Johannes Berg johannes at sipsolutions.net
Wed Sep 9 03:41:16 EDT 2020


From: Johannes Berg <johannes.berg at intel.com>

If the .config file changes, basically everything needs to be
rebuilt since we don't try to detect which symbols changed or
such. Now that the .config file handling is in the common
build system, make everything depend on it if there's one.

Signed-off-by: Johannes Berg <johannes.berg at intel.com>
---
 src/build.rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/build.rules b/src/build.rules
index 84979ff7ac82..932d58d4dfeb 100644
--- a/src/build.rules
+++ b/src/build.rules
@@ -78,10 +78,10 @@ $(BUILDDIR):
 _make_dirs:
 	@mkdir -p $(_DIRS)
 
-$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c | _make_dirs
+$(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs
 	$(Q)$(CC) -c -o $@ $(CFLAGS) $<
 	@$(E) "  CC " $<
-$(BUILDDIR)/$(PROJ)/%.o: %.c | _make_dirs
+$(BUILDDIR)/$(PROJ)/%.o: %.c $(CONFIG_FILE) | _make_dirs
 	$(Q)$(CC) -c -o $@ $(CFLAGS) $<
 	@$(E) "  CC " $<
 
-- 
2.26.2




More information about the Hostap mailing list