Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca@lucaceresoli.net>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 24/26] Improve TARGETS handling for bootloaders and kernel
Date: Mon, 20 Jun 2011 17:01:27 +0200	[thread overview]
Message-ID: <4DFF60C7.3010802@lucaceresoli.net> (raw)
In-Reply-To: <c1adbad069c35089a9ff5d9c8fc930e483b4b3d4.1306782275.git.thomas.petazzoni@free-electrons.com>

Hi Thomas,

Thomas Petazzoni wrote:
> As the kernel and bootloaders do not use the normal BR2_PACKAGE_*
> Kconfig options, their target name was not automatically added to the
> global TARGETS variable. Each bootloader .mk and the linux.mk had to
> add their own target manually to TARGETS, and the package
> infrastructure was making tests on non-existing Kconfig variables.
>
> This commit improves the package infrastructure so that it looks at
> BR2_PACKAGE_<pkg>  for packages, BR2_BOOT_<pkg>  for bootloaders and at
> the special BR2_LINUX_KERNEL for the linux package.
>
> This allows to simplify a little bit the bootloaders and linux .mk
> files.
>
> Signed-off-by: Thomas Petazzoni<thomas.petazzoni@free-electrons.com>
> ---
[...snip...]
> --- a/package/Makefile.package.in
> +++ b/package/Makefile.package.in
> @@ -522,10 +522,20 @@ $$($(2)_TARGET_UNINSTALL):		PKG=$(2)
>   $$($(2)_TARGET_CLEAN):			PKG=$(2)
>   $$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
>
> +# Compute the name of the Kconfig option that correspond to the
> +# package being enabled. We handle three cases: the special Linux
> +# kernel case, the bootloaders case, and the normal packages case.
> +ifeq ($(1),linux)
> +$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL
> +else ifeq ($(4),boot)
> +$(2)_KCONFIG_VAR = BR2_BOOT_$(2)
> +else ifeq ($(4),package)
> +$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
> +endif

This breaks all packages in subdirectories, such as
package/multimedia/ffmpeg, for which $(4) == "package/multimedia".

This can be fixed as:

-else ifeq ($(4),package)
+else ifeq ($(firstword $(subst /, ,$(4))),package)

or, even more simply:

-else ifeq ($(4),package)
+else

Luca

  reply	other threads:[~2011-06-20 15:01 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 20:22 [Buildroot] [pull request] Pull request for branch for-2011.08/bootloaders Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 01/26] Makefile.package.in: Makes it possible to override the default extract commands Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 02/26] Fix quoting in default extract command Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 03/26] linux: make it possible to install the kernel in /boot Thomas Petazzoni
2011-06-20 15:02   ` Luca Ceresoli
2011-06-20 15:52     ` Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 04/26] linux: use the defconfig mechanism after tuning the config Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 05/26] package: add infrastructure to install things in images/ Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 06/26] package: fix patching procedure for host packages Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 07/26] barebox: use = instead of := and re-indent Thomas Petazzoni
2011-05-30 20:22 ` [Buildroot] [PATCH 08/26] barebox: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 09/26] at91bootstrap: use = instead of := and indent properly Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 10/26] at91bootstrap: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 11/26] at91dataflashboot: use = instead of := and indent Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 12/26] at91dataflashboot: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 13/26] syslinux: " Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 14/26] grub: convert to AUTOTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 15/26] grub2: remove package Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 16/26] u-boot: convert to GENTARGETS Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 17/26] uboot-mkimage: new package Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 18/26] linux: rename LINUX26 to LINUX Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 19/26] linux: indent and align some definitions Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 20/26] package: add support for post-download hooks Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 21/26] linux: convert to the GENTARGETS infrastructure Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 22/26] boot: rename BR2_TARGET_* to BR2_BOOT_* Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 23/26] u-boot: rename options BR2_BOOT_UBOOT* to BR2_BOOT_U_BOOT* Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 24/26] Improve TARGETS handling for bootloaders and kernel Thomas Petazzoni
2011-06-20 15:01   ` Luca Ceresoli [this message]
2011-06-20 15:59     ` Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 25/26] linux: allow specification of a custom Git repository as a source Thomas Petazzoni
2011-05-30 23:14   ` Mike Frysinger
2011-05-31  6:58     ` Thomas Petazzoni
2011-05-30 20:23 ` [Buildroot] [PATCH 26/26] u-boot: allow specification of custom Git repo as source Thomas Petazzoni
2011-05-31 20:01 ` [Buildroot] [pull request] Pull request for branch for-2011.08/bootloaders Luca Ceresoli

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=4DFF60C7.3010802@lucaceresoli.net \
    --to=luca@lucaceresoli.net \
    --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