[PATCH] build: fix install target parent directory prerequisites

Grant Erickson marathon96
Wed Jan 4 23:07:40 PST 2012


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 at gmail.com>
---
 wpa_supplicant/Makefile |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

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
-- 
1.7.8.2




More information about the Hostap mailing list