Patchwork Minor fix to wpa_supplicant/Makefile

login
register
mail settings
Submitter Alan DeKok
Date Nov. 9, 2011, 2:54 p.m.
Message ID <4EBA942C.40803@deployingradius.com>
Download mbox | patch
Permalink /patch/124565/
State Accepted
Commit 8205c82a48c2fcab641556145deb06659ce7b70a
Headers show

Comments

Alan DeKok - Nov. 9, 2011, 2:54 p.m.
I ran into some build issues when editing .config.  Changing it
resulted in re-linking of objects, but not rebuilding of objects.

  The attached patch fixes that.

  Alan DeKok.
From 95d7542bae8ca40bc9f50a3f72f702b2900b117d Mon Sep 17 00:00:00 2001
From: Alan T. DeKok <aland@freeradius.org>
Date: Wed, 9 Nov 2011 15:50:40 +0100
Subject: [PATCH] Make objects depend on the .config file

The source code compiles into different objects depending on
the contents of .config.  Therefore, the objects should depend
on .config.

Previously, only the executables depended on .config.  This meant
that they were re-linked when .config changed.  But that relink
process used the old (and now wrong) objects.
---
 wpa_supplicant/Makefile |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Jouni Malinen - Nov. 19, 2011, 9:47 a.m.
On Wed, Nov 09, 2011 at 03:54:36PM +0100, Alan DeKok wrote:
>   I ran into some build issues when editing .config.  Changing it
> resulted in re-linking of objects, but not rebuilding of objects.
> 
>   The attached patch fixes that.

Thanks, applied.

Patch

diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 3641a58..d91880b 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1397,15 +1397,17 @@  wpa_priv: $(BCHECK) $(OBJS_priv)
 	$(Q)$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
 	@$(E) "  LD " $@
 
-wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
+$(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
+
+wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
 	$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
 	@$(E) "  LD " $@
 
-eapol_test: .config $(OBJS_t)
+eapol_test: $(OBJS_t)
 	$(Q)$(LDO) $(LDFLAGS) -o eapol_test $(OBJS_t) $(LIBS)
 	@$(E) "  LD " $@
 
-preauth_test: .config $(OBJS_t2) 
+preauth_test: $(OBJS_t2) 
 	$(Q)$(LDO) $(LDFLAGS) -o preauth_test $(OBJS_t2) $(LIBS)
 	@$(E) "  LD " $@