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>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
* +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).
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