diff mbox series

[v6,08/15] build: add .config file to dependencies

Message ID 1600421070-Icb541578dbe07c07f8e53407e92e0ce272c94e29@changeid
State Superseded
Headers show
Series build improvements | expand

Commit Message

Johannes Berg Sept. 18, 2020, 9:24 a.m. UTC
From: Johannes Berg <johannes.berg@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@intel.com>
---
 src/build.rules         | 4 ++--
 wpa_supplicant/Makefile | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/build.rules b/src/build.rules
index 4b04eca58cf6..bdcae65519cf 100644
--- a/src/build.rules
+++ b/src/build.rules
@@ -76,10 +76,10 @@  _DIRS := $(BUILDDIR)/$(PROJ)
 _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 " $<
 
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 9f81addd8228..c858f43b5909 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1866,8 +1866,6 @@  wpa_priv: $(BCHECK) $(OBJS_priv)
 	$(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
 	@$(E) "  LD " $@
 
-$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
-
 _OBJS_VAR := OBJS
 include ../src/objs.mk
 wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)