All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 3/5 v5] core/pkg-infra: allow meson packages to specify custom build rules
Date: Wed, 26 Dec 2018 09:52:28 +0100	[thread overview]
Message-ID: <acd0d092fa0c62970c3c8b5e3cecedeb73dcc4aa.1545814334.git.yann.morin.1998@free.fr> (raw)
In-Reply-To: <cover.1545814334.git.yann.morin.1998@free.fr>

Some packages may want to build only specific targets, instead of the
default.

So, allow them to provide FOO_NINJA_OPTS (not really options, but we
just mimicked the naming we already have for autotools packages).

Update the manual accordingly.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Cc: James Hilliard <james.hilliard1@gmail.com>
---
 docs/manual/adding-packages-meson.txt | 3 +++
 package/pkg-meson.mk                  | 4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/docs/manual/adding-packages-meson.txt b/docs/manual/adding-packages-meson.txt
index c52fe10506..549319b192 100644
--- a/docs/manual/adding-packages-meson.txt
+++ b/docs/manual/adding-packages-meson.txt
@@ -94,3 +94,6 @@ will therefore only use a few of them.
 * +FOO_NINJA_ENV+, to specify additional environment variables to pass to
   +ninja+, meson companion tool in charge of the build operations. By default,
   empty.
+
+* +FOO_NINJA_OPTS+, to specify a space-separated list of targets to build. By
+  default, empty, to build the default target(s).
diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 507e686068..0588660dbf 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -103,12 +103,12 @@ ifndef $(2)_BUILD_CMDS
 ifeq ($(4),target)
 define $(2)_BUILD_CMDS
 	$$(TARGET_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
-		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
 endef
 else
 define $(2)_BUILD_CMDS
 	$$(HOST_MAKE_ENV) $$($$(PKG)_NINJA_ENV) \
-		$$(NINJA) $$(NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
+		$$(NINJA) $$(NINJA_OPTS) $$($$(PKG)_NINJA_OPTS) -C $$($$(PKG)_SRCDIR)/build
 endef
 endif
 endif
-- 
2.14.1

  parent reply	other threads:[~2018-12-26  8:52 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-26  8:52 [Buildroot] [PATCH 0/5 v5] systemd-boot: new simple EFI bootloader replacing gummmiboot (branch yem/systemd-boot) Yann E. MORIN
2018-12-26  8:52 ` [Buildroot] [PATCH 1/5 v5] package/meson: never try to run generated target binaries Yann E. MORIN
2018-12-28 10:54   ` Thomas Petazzoni
2018-12-26  8:52 ` [Buildroot] [PATCH 2/5 v5] package/meson: fix CPU familly Yann E. MORIN
2018-12-28 10:54   ` Thomas Petazzoni
2018-12-26  8:52 ` Yann E. MORIN [this message]
2018-12-26 11:36   ` [Buildroot] [PATCH 3/5 v5] core/pkg-infra: allow meson packages to specify custom build rules James Hilliard
2018-12-26 12:06     ` Yann E. MORIN
2018-12-27  4:21       ` James Hilliard
2018-12-27  8:23         ` Yann E. MORIN
2018-12-28 10:54   ` Thomas Petazzoni
2018-12-26  8:52 ` [Buildroot] [PATCH 4/5 v5] package/systemd: enable building of systemd-boot Yann E. MORIN
2018-12-26  8:52 ` [Buildroot] [PATCH 5/5 v5] boot/systemd-boot: new package Yann E. MORIN
2018-12-26  9:33   ` Yann E. MORIN
2018-12-26 21:23   ` Thomas Petazzoni
2018-12-26 21:37     ` James Hilliard
2018-12-26 21:43       ` Thomas Petazzoni
2018-12-26 21:52         ` James Hilliard
2018-12-26 21:41     ` Yann E. MORIN
2018-12-26 22:07       ` James Hilliard
2018-12-26 22:12         ` James Hilliard
2018-12-26 22:52           ` James Hilliard
2018-12-27  1:27             ` James Hilliard
2018-12-27  8:49               ` Yann E. MORIN
2018-12-27  9:07                 ` James Hilliard
2018-12-27  9:11                   ` Yann E. MORIN
2018-12-27  9:13                     ` James Hilliard
2018-12-27 10:40                       ` Yann E. MORIN
2018-12-27 10:42                         ` James Hilliard
2018-12-27 10:57                           ` Yann E. MORIN
2018-12-27 11:01                             ` James Hilliard
2018-12-29  9:35                               ` Yann E. MORIN
2018-12-29 10:50                                 ` James Hilliard
2018-12-29 11:38                                   ` Yann E. MORIN
2018-12-29 11:43                                     ` James Hilliard
2018-12-30  8:44                                     ` James Hilliard
2018-12-31 10:16                                       ` Yann E. MORIN
2018-12-31 10:24                                         ` James Hilliard
2018-12-31 10:36                                           ` Yann E. MORIN
2018-12-31 12:43       ` Peter Korsgaard
2019-01-10 23:47   ` Arnout Vandecappelle
2019-01-11  5:59     ` Yann E. MORIN
2019-01-11  6:47     ` James Hilliard

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=acd0d092fa0c62970c3c8b5e3cecedeb73dcc4aa.1545814334.git.yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --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.