Commit graph

8 commits

Author SHA1 Message Date
Lionel Orry 0496a6a842 package/pkg-waf: add support for <pkg>_SUBDIR
In the Buildroot manual, it is specified that the Waf-based
infrastructure supports the <pkg>_SUBDIR variable, which was not true.

This patch:
* makes use of this variable by changing to the given sub-directory
  before executing waf commands,
* documents the usage of <pkg>_SUBDIR in the waf-specific section of
  the manual.

Signed-off-by: Lionel Orry <lionel.orry@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-02-06 17:21:25 +01:00
Thomas Petazzoni d1d2d0ac63 package/pkg-waf: properly escape HOST_DIR when defining <pkg>_WAF
When <pkg>_NEEDS_EXTERNAL_WAF is set to YES, <pkg>_WAF is set to
$(HOST_DIR)/bin/waf within the inner-waf-package macro. This reference
to $(HOST_DIR) should use $$(HOST_DIR) so that it is properly expanded
at the time of use, and not at the time of the macro expansion.

In the current Buildroot, this doesn't cause any visible problem
because $(HOST_DIR) points to the same directory for all
packages. However, with per-package host/target directories, this is
no longer the case. It causes a build issue because it tries to use
"waf" from the global host directory, which doesn't exist during the
build.

This commit fixes the following build issue with per package
host/target directories:

/home/test/autobuild/run/instance-2/output/per-package/mpv/host/bin/python2: can't open file '/home/test/autobuild/run/instance-2/output/host/bin/waf': [Errno 2] No such file or directory
make: *** [/home/test/autobuild/run/instance-2/output/build/mpv-0.27.2/.stamp_configured] Error 2

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-09-25 22:24:46 +02:00
Arnout Vandecappelle 0f9c0bf3d5 Globally replace $(HOST_DIR)/usr/bin with $(HOST_DIR)/bin
Since things are no longer installed in $(HOST_DIR)/usr, the callers
should also not refer to it.

This is a mechanical change with
git grep -l '$(HOST_DIR)/usr/bin' | xargs sed -i 's%$(HOST_DIR)/usr/bin%$(HOST_DIR)/bin%g'

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-07-05 15:19:29 +02:00
Bernd Kuhls cc405b4cb3 arch, linux, package: remove whitespaces
Whitespaces were searched using the following regex:

[ ]{1,}\t

and then manually removed in most of the cases. For
xserver_xorg-server.mk, tabs before backslashes were removed.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-03-29 23:30:37 +02:00
Romain Naour 2618115c20 pkg-waf: add a common variable for each step
Some waf packages may want to pass additional variables to waf script
for each build step. Add the possibility to do so by defining
<pkg>_WAF_OPTS.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-11 15:26:26 +01:00
Romain Naour 611d6e1a88 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>
2016-12-11 15:26:19 +01:00
Romain Naour 693031b39c pkg-waf: add additional variables for each install step
Some waf packages may want to pass additional variables to waf script
in install step. Add the possibility to do so by defining the
following variables:

  <pkg>_INSTALL_STAGING_OPTS for the install to staging directory
  <pkg>_INSTALL_TARGET_OPTS for the install to target directory

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-11 15:26:02 +01:00
Yann E. MORIN 24d23bbce7 core: add waf-package infra
This new waf-package infrastructure simplifies writing waf-based
packages. It can be used by our six current such packages, plus a
later-incoming one by Romain.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Romain Naour <romain.naour@openwide.fr>
Reviewed-by: Romain Naour <romain.naour@gmail.com>
Tested-by: Romain Naour <romain.naour@gmail.com>
[Thomas:
 - rename <pkg>_BUNDLED_WAF to <pkg>_NEEDS_EXTERNAL_WAF, which
   involves inverting the meaning of the boolean.
 - always add the host-python dependency
 - add a default value for <pkg>_NEEDS_EXTERNAL_WAF (defaults to NO)
 - remove the unneeded <pkg>_MAKE related definitions.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-12-02 22:11:38 +01:00