summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2015-08-28 13:23:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-01 11:43:57 +0100
commit464f4e2079e478b6f27351b1254aca49c6882990 (patch)
tree507a332cc13a6425810633d6d239e362e9ecfc2d /meta
parentfbb8b53730689e14d0c8df7ae4ecd4837a1f9821 (diff)
downloadpoky-464f4e2079e478b6f27351b1254aca49c6882990.tar.gz
iw: support and enable separate build dir
(From OE-Core rev: bc5401009332eb639d73fa4cbba217ff6899c787) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/iw/iw/separate-objdir.patch57
-rw-r--r--meta/recipes-connectivity/iw/iw_4.1.bb4
2 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/iw/iw/separate-objdir.patch b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
new file mode 100644
index 0000000000..883f8b2c60
--- /dev/null
+++ b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
@@ -0,0 +1,57 @@
1From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001
2From: Christopher Larson <chris_larson@mentor.com>
3Date: Wed, 26 Aug 2015 17:23:48 -0700
4Subject: [PATCH] Support separation of SRCDIR and OBJDIR
5
6Typical use of VPATH to locate the sources.
7
8Upstream-Status: Pending
9
10Signed-off-by: Christopher Larson <chris_larson@mentor.com>
11
12---
13 Makefile | 7 +++++--
14 version.sh | 2 +-
15 2 files changed, 6 insertions(+), 3 deletions(-)
16
17diff --git a/Makefile b/Makefile
18index 548591a..da8d33a 100644
19--- a/Makefile
20+++ b/Makefile
21@@ -1,5 +1,8 @@
22 MAKEFLAGS += --no-print-directory
23
24+SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
25+OBJDIR ?= $(PWD)
26+VPATH = $(SRCDIR)
27 PREFIX ?= /usr
28 SBINDIR ?= $(PREFIX)/sbin
29 MANDIR ?= $(PREFIX)/share/man
30@@ -95,11 +98,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))
31 version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h Makefile \
32 $(wildcard .git/index .git/refs/tags)
33 @$(NQ) ' GEN ' $@
34- $(Q)./version.sh $@
35+ $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@
36
37 %.o: %.c iw.h nl80211.h
38 @$(NQ) ' CC ' $@
39- $(Q)$(CC) $(CFLAGS) -c -o $@ $<
40+ $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $<
41
42 ifeq ($(IW_ANDROID_BUILD),)
43 iw: $(OBJS)
44diff --git a/version.sh b/version.sh
45index 5354383..fa954cf 100755
46--- a/version.sh
47+++ b/version.sh
48@@ -5,5 +5,5 @@ OUT="$1"
49
50 v="$VERSION"
51
52-echo '#include "iw.h"' > "$OUT"
53+echo '#include <iw.h>' > "$OUT"
54 echo "const char iw_version[] = \"$v\";" >> "$OUT"
55--
562.2.1
57
diff --git a/meta/recipes-connectivity/iw/iw_4.1.bb b/meta/recipes-connectivity/iw/iw_4.1.bb
index 8e278621e6..fafb0e3c9e 100644
--- a/meta/recipes-connectivity/iw/iw_4.1.bb
+++ b/meta/recipes-connectivity/iw/iw_4.1.bb
@@ -11,6 +11,7 @@ DEPENDS = "libnl"
11 11
12SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ 12SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
13 file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \ 13 file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
14 file://separate-objdir.patch \
14" 15"
15 16
16SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7" 17SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7"
@@ -19,10 +20,13 @@ SRC_URI[sha256sum] = "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9
19inherit pkgconfig 20inherit pkgconfig
20 21
21EXTRA_OEMAKE = "\ 22EXTRA_OEMAKE = "\
23 -f '${S}/Makefile' \
24 \
22 'PREFIX=${prefix}' \ 25 'PREFIX=${prefix}' \
23 'SBINDIR=${sbindir}' \ 26 'SBINDIR=${sbindir}' \
24 'MANDIR=${mandir}' \ 27 'MANDIR=${mandir}' \
25" 28"
29B = "${WORKDIR}/build"
26 30
27do_install() { 31do_install() {
28 oe_runmake 'DESTDIR=${D}' install 32 oe_runmake 'DESTDIR=${D}' install