Questions tagged [waf]

Waf is a Python-based framework for configuring, compiling and installing applications. It derives from the concepts of other build tools such as Scons, Autotools, CMake or Ant. If your question is about AWS WAF, use [amazon-waf] instead. If your question is about web application firewall, use [web-application-firewall] instead.

More information about the Waf project can be found at the following locations.

Help is also available:

  • on the waf-users mailing list
  • on IRC (#waf on freenode, with searchable, archived logs here).
309 questions
1
vote
1 answer

Add --all option to wscript

I have several targets defined in my top wscript, let's call them build_a, build_b and build_c. How do I add a function all to my wscript, that builds all these targets (doesn't matter if sequential or in parallel). So in dummy python code, I expect…
wafwafwaf
  • 191
  • 9
1
vote
1 answer

How to use multiple compilers with waf (Python)

I can't figure out how to use two different compilers in the same wscript. Nothing in the Waf book shows this clearly. I tried something among those lines : def configure(ctx): ctx.setenv('compiler1') ctx.env.CC = '/some/compiler' …
XDD
  • 47
  • 6
1
vote
0 answers

Waf script '1.9.15' and library '1.8.19' do not match

I am currently working on NDN architecture (one of the ICN architecture) and for that i need ndn-traffic generator module. This module is available on github. You can find it here. The prerequisite for ndn-traffic-generator is ndn-cxx which is NDN…
Coding bat
  • 563
  • 6
  • 12
1
vote
1 answer

How to dynamically set the number of jobs in Waf

I am using Waf to automate the building process of my project. The problem is that I have two kinds of parallelization. The first one is by using a switch for the job number meaning parallel processes when running Waf on the command line. $ python…
tobiasraabe
  • 427
  • 1
  • 6
  • 12
1
vote
1 answer

waf cross-project dependencies

I have a trivial waf project: $ root |-- a | `-- wscript |-- b | `-- wscript `-- wscript Root wscript is def configure(conf): pass def build(bld): bld.recurse('a b') a wscript is def build(bld): bld (rule = 'touch ${TGT}', target…
Anton
  • 978
  • 5
  • 11
1
vote
1 answer

NS-3 Simulation takes too long

I'm using Ubuntu 16.40 with 4GB of RAM. ./waf --pyrun wifi-olsr-flowmonitor.py When I run the wifi-olsr-flowmonitor.py file in NS-3 for 9 nodes, it took 17 hours to complete the simulation. Why did it take that long? And what can I do to prevent…
wayo
  • 19
  • 1
  • 9
1
vote
1 answer

Use configure and/or build attributes in Task.Task in waf

I set some additional attributes in env in the wscript in the configure and the build step. I realize a feature as Task.Task and I need to retrieve some of the information stored in env, but this does not work. MWE and the produced error: from…
wafwafwaf
  • 191
  • 9
1
vote
2 answers

How to specify os platform in waf script?

I'm new to waf build tool and I've googled for answers but very few unhelpful links. Does anyone know? As wscript is essentially a python script, I suppose I could use the os package?
jinglei
  • 3,269
  • 11
  • 27
  • 46
1
vote
1 answer

Use different configuration sources as input to waf's doxygen feature

Based on the question I asked here, where I wanted to use different sources based on the build variant specified, it now appears that I have the same problem for building the doxygen documentation, as I need different configurations based on the…
wafwafwaf
  • 191
  • 9
1
vote
0 answers

How to build for Windows XP using WAF

What needs to be done to build for Windows XP using the latest version of WAF and MSVC 2015? In the GUI, you can set the platform toolset to "Windows XP." Can this be done in the wscript?
xaav
  • 7,876
  • 9
  • 30
  • 47
1
vote
1 answer

Use different source in waf build variant

Based on this it is possible to build different variants of a project in waf to different output directories 7.2.2. Changing the output directory / Configuration sets for variants (https://waf.io/book/#_custom_build_outputs) But I do not understand…
wafwafwaf
  • 191
  • 9
1
vote
1 answer

Copying multiple files in waf using only a single target

The waf book shows that I can create a task generator which will copy a file: def build(ctx): ctx(source='wscript', target='foo.txt', rule='cp ${SRC} ${TGT}') This will result in a target, shown with waf configure list, called foo.txt. So that…
EMiller
  • 2,792
  • 4
  • 34
  • 55
1
vote
1 answer

How to add predefines to the .cproject file after running a Build Target

I'm trying to import a C project to eclipse (CDT) that is managed by waf. There is a list of predefines generated by waf (when running ./waf configure). That list has to be imported to Project->Properties->C/C++ General/Paths and Symbols/Symbols/GNU…
Michael Banucu
  • 219
  • 2
  • 9
1
vote
1 answer

How to set a command as a dependency in waf

I have a waf rule that does not create a file, so I don't have a target. I'd like another waf rule to be run strictly after the first rule. Below is a contrived example of this type of situation. In Make syntax, I'm trying to do something like the…
dbn
  • 13,144
  • 3
  • 60
  • 86
1
vote
0 answers

How to use WAF with a MacPorts installation

I have a project with uses WAF (not a project I originated). Some people are going to compile the project on Windows, others on Linux, some on OS X. Those compiling on OS X might use MacPorts, others use Homebrew, others might use custom compiled…
watkipet
  • 959
  • 12
  • 23