pkg-waf: add additional variables for build step

Some waf packages may want to pass additional variables to waf script in
build step. Add the possibility to do so by defining <pkg>_BUILD_OPTS.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
Romain Naour 2016-12-06 20:49:07 +01:00 committed by Thomas Petazzoni
parent 693031b39c
commit 611d6e1a88

View File

@ -49,6 +49,7 @@ else
$(2)_WAF = ./waf $(2)_WAF = ./waf
endif endif
$(2)_BUILD_OPTS ?=
$(2)_INSTALL_STAGING_OPTS ?= $(2)_INSTALL_STAGING_OPTS ?=
$(2)_INSTALL_TARGET_OPTS ?= $(2)_INSTALL_TARGET_OPTS ?=
@ -75,7 +76,8 @@ endif
ifndef $(2)_BUILD_CMDS ifndef $(2)_BUILD_CMDS
define $(2)_BUILD_CMDS define $(2)_BUILD_CMDS
cd $$(@D) && \ cd $$(@D) && \
$$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) build -j $$(PARALLEL_JOBS) $$(TARGET_MAKE_ENV) $$(HOST_DIR)/usr/bin/python2 $$($(2)_WAF) \
build -j $$(PARALLEL_JOBS) $$($(2)_BUILD_OPTS)
endef endef
endif endif