[OE-core] [PATCH 4/5] iw: support and enable separate build dir

Jussi Kukkonen jussi.kukkonen at intel.com
Fri Aug 28 07:38:23 UTC 2015


On 27 August 2015 at 21:48, Christopher Larson <kergoth at gmail.com> wrote:

> From: Christopher Larson <chris_larson at mentor.com>
>
> Signed-off-by: Christopher Larson <chris_larson at mentor.com>
> ---
>  .../iw/iw/separate-objdir.patch                    | 55
> ++++++++++++++++++++++
>  meta/recipes-connectivity/iw/iw_4.1.bb             |  4 ++
>  2 files changed, 59 insertions(+)
>  create mode 100644 meta/recipes-connectivity/iw/iw/separate-objdir.patch
>
> 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 0000000..e29e461
> --- /dev/null
> +++ b/meta/recipes-connectivity/iw/iw/separate-objdir.patch
> @@ -0,0 +1,55 @@
> +From 9e27fc2e1b3dc8c36ef6a502edffc3a3d84d9dd9 Mon Sep 17 00:00:00 2001
> +From: Christopher Larson <chris_larson at mentor.com>
> +Date: Wed, 26 Aug 2015 17:23:48 -0700
> +Subject: [PATCH] Support separation of SRCDIR and OBJDIR
> +
> +Typical use of VPATH to locate the sources.
> +
> +Signed-off-by: Christopher Larson <chris_larson at mentor.com>
> +
>

Upstream-Status ?

 - Jussi

+---
> + Makefile   | 7 +++++--
> + version.sh | 2 +-
> + 2 files changed, 6 insertions(+), 3 deletions(-)
> +
> +diff --git a/Makefile b/Makefile
> +index 548591a..da8d33a 100644
> +--- a/Makefile
> ++++ b/Makefile
> +@@ -1,5 +1,8 @@
> + MAKEFLAGS += --no-print-directory
> +
> ++SRCDIR ?= $(dir $(lastword $(MAKEFILE_LIST)))
> ++OBJDIR ?= $(PWD)
> ++VPATH = $(SRCDIR)
> + PREFIX ?= /usr
> + SBINDIR ?= $(PREFIX)/sbin
> + MANDIR ?= $(PREFIX)/share/man
> +@@ -95,11 +98,11 @@ VERSION_OBJS := $(filter-out version.o, $(OBJS))
> + version.c: version.sh $(patsubst %.o,%.c,$(VERSION_OBJS)) nl80211.h iw.h
> Makefile \
> +               $(wildcard .git/index .git/refs/tags)
> +       @$(NQ) ' GEN ' $@
> +-      $(Q)./version.sh $@
> ++      $(Q)cd $(SRCDIR) && ./version.sh $(OBJDIR)/$@
> +
> + %.o: %.c iw.h nl80211.h
> +       @$(NQ) ' CC  ' $@
> +-      $(Q)$(CC) $(CFLAGS) -c -o $@ $<
> ++      $(Q)$(CC) -I$(SRCDIR) $(CFLAGS) -c -o $@ $<
> +
> + ifeq ($(IW_ANDROID_BUILD),)
> + iw:   $(OBJS)
> +diff --git a/version.sh b/version.sh
> +index 5354383..fa954cf 100755
> +--- a/version.sh
> ++++ b/version.sh
> +@@ -5,5 +5,5 @@ OUT="$1"
> +
> + v="$VERSION"
> +
> +-echo '#include "iw.h"' > "$OUT"
> ++echo '#include <iw.h>' > "$OUT"
> + echo "const char iw_version[] = \"$v\";" >> "$OUT"
> +--
> +2.2.1
> +
> diff --git a/meta/recipes-connectivity/iw/iw_4.1.bb
> b/meta/recipes-connectivity/iw/iw_4.1.bb
> index 8e27862..fafb0e3 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"
>
>  SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \
>
> file://0001-iw-version.sh-don-t-use-git-describe-for-versioning.patch \
> +           file://separate-objdir.patch \
>  "
>
>  SRC_URI[md5sum] = "68c282285c71c956069957e9ca10a6a7"
> @@ -19,10 +20,13 @@ SRC_URI[sha256sum] =
> "14bfc627b37f7f607e4ffa63a70ded15fa2ea85177f703cb17d7fe36f9
>  inherit pkgconfig
>
>  EXTRA_OEMAKE = "\
> +    -f '${S}/Makefile' \
> +    \
>      'PREFIX=${prefix}' \
>      'SBINDIR=${sbindir}' \
>      'MANDIR=${mandir}' \
>  "
> +B = "${WORKDIR}/build"
>
>  do_install() {
>      oe_runmake 'DESTDIR=${D}' install
> --
> 2.2.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20150828/ce2deb6f/attachment-0002.html>


More information about the Openembedded-core mailing list