All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v1 04/14] autotools infrastructure: support out of tree build
Date: Thu, 24 Jan 2013 22:57:19 +0100	[thread overview]
Message-ID: <5101AE3F.1040105@mind.be> (raw)
In-Reply-To: <1358725943-31485-5-git-send-email-thomas.petazzoni@free-electrons.com>

On 01/21/13 00:52, Thomas Petazzoni wrote:
> All autotools packages are supposed to support out of tree build, so
> we mark this at the package infrastructure level, and adjust the
> infrastructure to execute the configure script from the build
> directory.
>
> Signed-off-by: Thomas Petazzoni<thomas.petazzoni@free-electrons.com>
> ---
>   package/pkg-autotools.mk |   27 +++++++++++++--------------
>   1 file changed, 13 insertions(+), 14 deletions(-)
>
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index 843239d..bd87253 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -78,8 +78,6 @@ ifndef $(2)_SUBDIR
>    endif
>   endif
>
> -$(2)_SRCSUBDIR = $$($(2)_SRCDIR)/$($(2)_SUBDIR)
> -
>   $(2)_CONF_ENV			?=
>   $(2)_CONF_OPT			?=
>   $(2)_MAKE_ENV			?=
> @@ -91,6 +89,7 @@ $(2)_INSTALL_TARGET_OPT		?= DESTDIR=$$(TARGET_DIR)  install
>   $(2)_CLEAN_OPT			?= clean
>   $(2)_UNINSTALL_STAGING_OPT	?= DESTDIR=$$(STAGING_DIR) uninstall
>   $(2)_UNINSTALL_TARGET_OPT	?= DESTDIR=$$(TARGET_DIR)  uninstall
> +$(2)_SUPPORTS_OUT_OF_TREE        = YES

  Out of tree build may be broken for some packages, so I would make this 
?= YES.

>
>
>   #
> @@ -103,11 +102,11 @@ ifeq ($(5),target)
>
>   # Configure package for target
>   define $(2)_CONFIGURE_CMDS
> -	(cd $$($$(PKG)_SRCSUBDIR)&&  rm -rf config.cache&&  \
> +	(cd $$($$(PKG)_BUILDDIR)&&  rm -rf config.cache&&  \
>   	$$(TARGET_CONFIGURE_OPTS) \
>   	$$(TARGET_CONFIGURE_ARGS) \
>   	$$($$(PKG)_CONF_ENV) \
> -	./configure \
> +	$$($$(PKG)_SRCDIR)/$$($$(PKG)_SUBDIR)/configure \
>   		--target=$$(GNU_TARGET_NAME) \
>   		--host=$$(GNU_TARGET_NAME) \
>   		--build=$$(GNU_HOST_NAME) \

  Hm, not sure I like this. The build system may refer to something 
outside the subdir and may get confused by the changed path. So I'd do an 
mkdir -p of $($(PKG)_BUILDDIR)/$($(PKG)_SUBDIR) and build there.



  Regards,
  Arnout

[snip]

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2013-01-24 21:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 23:52 [Buildroot] [RFC v1] Prototype implementation of per-package out of tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 01/14] Add a new "src" directory in the output directory Thomas Petazzoni
2013-01-21 13:47   ` Jérôme Pouiller
2013-01-21 17:16     ` Thomas Petazzoni
2013-01-22 10:15       ` Jérôme Pouiller
2013-01-22 16:49         ` Thomas Petazzoni
2013-01-22 17:12           ` Jérôme Pouiller
2013-01-23 15:45             ` Thomas Petazzoni
2013-01-24 10:34               ` Jérôme Pouiller
2013-01-20 23:52 ` [Buildroot] [RFC v1 02/14] package infrastructure: move subdir support to autotools Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 03/14] generic infrastructure: out of tree build support Thomas Petazzoni
2013-01-24 21:41   ` Arnout Vandecappelle
2013-01-20 23:52 ` [Buildroot] [RFC v1 04/14] autotools infrastructure: support out of tree build Thomas Petazzoni
2013-01-24 21:57   ` Arnout Vandecappelle [this message]
2013-01-20 23:52 ` [Buildroot] [RFC v1 05/14] autotools infrastructure: do the autoreconf as a post patch step Thomas Petazzoni
2013-01-26 22:03   ` Arnout Vandecappelle
2013-01-27 16:27     ` Thomas Petazzoni
2013-01-27 22:18       ` Arnout Vandecappelle
2013-01-28  8:13         ` Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 06/14] cmake infrastructure: support out of tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 07/14] busybox: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 08/14] mtd: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 09/14] barebox: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 10/14] uboot: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 11/14] linux: " Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 12/14] autoconf: fix out-of-tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 13/14] cmake: support out of tree build Thomas Petazzoni
2013-01-20 23:52 ` [Buildroot] [RFC v1 14/14] makedevs: " Thomas Petazzoni
2013-01-21  4:24 ` [Buildroot] [RFC v1] Prototype implementation of per-package out oftree build Przemyslaw Wrzos
2013-01-21 17:26   ` Thomas Petazzoni
2013-01-21 18:51     ` Stephan Hoffmann
2013-01-24 20:12 ` [Buildroot] [RFC v1] Prototype implementation of per-package out of tree build Arnout Vandecappelle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5101AE3F.1040105@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.