diff mbox

build: fix install target parent directory prerequisites

Message ID 1325747260-31656-1-git-send-email-marathon96@gmail.com
State Accepted
Commit b1117643846bdcd104e04512f84ae131e7e60eb5
Headers show

Commit Message

Grant Erickson Jan. 5, 2012, 7:07 a.m. UTC
This changes the install target such that parent directories of
installed paths area created and each path is only installed
on a dependency basis.

Signed-off-by: Grant Erickson <marathon96@gmail.com>
---
 wpa_supplicant/Makefile |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Comments

Jouni Malinen Jan. 29, 2012, 12:19 p.m. UTC | #1
On Wed, Jan 04, 2012 at 11:07:40PM -0800, Grant Erickson wrote:
> This changes the install target such that parent directories of
> installed paths area created and each path is only installed
> on a dependency basis.

Thanks, applied.
diff mbox

Patch

diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 0832f10..7426aa6 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -48,9 +48,10 @@  mkconfig:
 	echo CONFIG_DRIVER_HOSTAP=y >> .config
 	echo CONFIG_DRIVER_WEXT=y >> .config
 
-install: all
-	mkdir -p $(DESTDIR)$(BINDIR)
-	for i in $(ALL); do cp $$i $(DESTDIR)$(BINDIR)/$$i; done
+$(DESTDIR)$(BINDIR)/%: %
+	install -D $(<) $(@)
+
+install: $(addprefix $(DESTDIR)$(BINDIR)/,$(ALL))
 	$(MAKE) -C ../src install
 
 OBJS = config.o