pkg-waf: add additional variables for build step
authorRomain Naour <romain.naour@gmail.com>
Tue, 6 Dec 2016 19:49:07 +0000 (20:49 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 11 Dec 2016 14:26:19 +0000 (15:26 +0100)
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>
package/pkg-waf.mk

index a82f45ce4919fa8b94eea355d9dbef748d9563b9..f9d435e8791f791f660333a7c402d9efb7aba945 100644 (file)
@@ -49,6 +49,7 @@ else
 $(2)_WAF = ./waf
 endif
 
+$(2)_BUILD_OPTS                        ?=
 $(2)_INSTALL_STAGING_OPTS              ?=
 $(2)_INSTALL_TARGET_OPTS               ?=
 
@@ -75,7 +76,8 @@ endif
 ifndef $(2)_BUILD_CMDS
 define $(2)_BUILD_CMDS
        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
 endif