Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v8 RESEND 2/8] package: add toolchain dependency to every target package
Date: Wed, 23 Oct 2013 23:53:33 +0200	[thread overview]
Message-ID: <5268455D.10106@mind.be> (raw)
In-Reply-To: <1382088860-30524-3-git-send-email-fabio.porcedda@gmail.com>

On 18/10/13 11:34, Fabio Porcedda wrote:
> This commit makes the dependency from the target toolchain explicit.
> This way we can buid from command line a package that use
> innger-generic-package right after the configuration phase, example:
>
> 	make clean <package-name>
>
> Also remove TARGETS_ALL because the only purpose was to add toolchain
> dependency so it's superseded by this commit.
>
> To prevent circular dependency add the new variable <pkgname>_TOOLCHAIN
> for not adding the toolchain dependency for toolchain packages.
>
> This is also a step forward supporting top-level parallel make.
>
> Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>

  I'm not happy with this _ADD_TOOLCHAIN_DEPENDENCY variable.

  What I would prefer is to move glibc, linux-headers and uclibc back 
under the toolchain directory (why did they ever move out, Thomas?) and 
to filter on $(pkgparentdir)

ifeq ($(5),target)
ifneq ($(pkgparentdir),toolchain)
$(2)_DEPENDENCIES += toolchain
endif
endif


[snip]
> diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk
> index 9523529..f58570d 100644
> --- a/package/pkg-autotools.mk
> +++ b/package/pkg-autotools.mk
> @@ -209,7 +209,8 @@ endef
>   # This must be repeated from inner-generic-package, otherwise we get an empty
>   # _DEPENDENCIES if _AUTORECONF is YES.  Also filter the result of _AUTORECONF
>   # away from the non-host rule
> -$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool $(1),\
> +$(2)_DEPENDENCIES ?= $(filter-out host-automake host-autoconf host-libtool \
> +				host-toolchain $(1),\

  You'll also need to do this in pkg-cmake.mk.

>       $(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
>
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 1e7154e..3f19aea 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -307,8 +307,16 @@ endif
>
>   $(2)_REDISTRIBUTE		?= YES
>
> -
> -$(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
> +# When a target package is a toolchain dependency set this variable to
> +# 'NO' so the 'toolchain' dependency is not added to prevent a circular
> +# dependency
> +$(2)_ADD_TOOLCHAIN_DEPENDENCY	?= YES
> +
> +$(2)_DEPENDENCIES ?= $(filter-out  host-toolchain $(1),\
> +	$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
> +ifeq ($$($(2)_TYPE)-$$($(2)_ADD_TOOLCHAIN_DEPENDENCY),target-YES)

  It's more readable if you split this and-ing in two separate conditions.

  For $(2)_TYPE, you can directly use $(5) because you're anyway inside 
inner-generic-package here.


  Regards,
  Arnout

> +$(2)_DEPENDENCIES += toolchain
> +endif
>
>   $(2)_INSTALL_STAGING		?= NO
>   $(2)_INSTALL_IMAGES		?= NO

[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-10-23 21:53 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-18  9:34 [Buildroot] [PATCH v8 RESEND 0/8] Add support for top-level parallel make Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 1/8] package: add base dependency to every package Fabio Porcedda
2013-10-23 21:12   ` Arnout Vandecappelle
2013-10-24  7:41     ` Fabio Porcedda
2013-10-24  8:22       ` Thomas De Schampheleire
2013-10-25  8:09         ` Fabio Porcedda
2013-10-24 10:37       ` Arnout Vandecappelle
2013-10-25  8:07         ` Fabio Porcedda
2013-10-25  8:12           ` Arnout Vandecappelle
2013-10-25  8:45             ` Fabio Porcedda
2013-10-29  8:36               ` Fabio Porcedda
2013-10-29  9:35                 ` Thomas De Schampheleire
2013-10-29 11:06                   ` Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 2/8] package: add toolchain dependency to every target package Fabio Porcedda
2013-10-23 21:53   ` Arnout Vandecappelle [this message]
2013-10-27 17:55     ` Thomas Petazzoni
2013-10-28  8:01       ` Arnout Vandecappelle
2013-11-05  9:41     ` Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 3/8] package: add support for top-level parallel make Fabio Porcedda
2013-10-23 22:19   ` Arnout Vandecappelle
2013-11-11  9:36     ` Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 4/8] Makefile: " Fabio Porcedda
2013-10-23 22:29   ` Arnout Vandecappelle
2013-11-11 12:54     ` Fabio Porcedda
2013-10-23 22:40   ` Arnout Vandecappelle
2013-11-11 12:26     ` Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 5/8] glibc: " Fabio Porcedda
2013-10-23 22:48   ` Arnout Vandecappelle
2013-11-11 12:47     ` Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 6/8] uclibc: " Fabio Porcedda
2013-10-23 22:49   ` Arnout Vandecappelle
2013-11-11 12:50     ` Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 7/8] package: enable jobserver for recursive make Fabio Porcedda
2013-10-18  9:34 ` [Buildroot] [PATCH v8 RESEND 8/8] Makefile: enable top-level parallel make Fabio Porcedda
2013-10-23 21:09 ` [Buildroot] [PATCH v8 RESEND 0/8] Add support for " Arnout Vandecappelle
2013-11-11 13:49 ` Thomas Petazzoni
2013-11-12  8:39   ` Fabio Porcedda
2013-11-13 13:40     ` Fabio Porcedda
2013-11-13 20:05     ` Arnout Vandecappelle
2013-11-14  9:15       ` Fabio Porcedda

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=5268455D.10106@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox