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
2
votes
0 answers

How to include header only directory to run ns-3?

I'm working on ns-3 to include header files to my own module. I've tried to type commands on ./waf command and wscript file, but it doesn't work. Below I listed the commands that I've tried. In wscript file, conf.env.append_value('CXXFLAGS',…
Minsu Kim
  • 23
  • 5
2
votes
0 answers

How to build QT QML / Quick Application using WAF?

I'm trying to build a QT Quick application using WAF. However, it looks like WAF doesn't know what to do with .qml files. I can build a QT Widget application in WAF using: https://waf.io/apidocs/tools/qt5.html def options(opt): …
2
votes
0 answers

How do I build/compile Aubio for Android?

Aubio is a tool, written in C, that analyzes sound files. It is compatible for android, ios and many more platforms. My Question: Is there a step by step guide on how to build aubio for android - or at least a list of all the tools needed (waf, ndk,…
Sami
  • 21
  • 1
2
votes
1 answer

Remove some main commands and/or default options from waf in wscript

I have a waf script which adds some options, therefore I use Options from the waflib. A minimal working example is: from waflib import Context, Options from waflib.Tools.compiler_c import c_compiler def options(opt): opt.load('compiler_c') def…
wafwafwaf
  • 191
  • 9
2
votes
1 answer

Tell waf to wait for task to finish before staring next task

I have two Tasks in waf and they need to be exectued in the correct order, and the second task, has to wait until the first task has finished. To show that it's behaving the way I expected it to work, I wait inside the tasks, in the first task (t_1)…
wafwafwaf
  • 191
  • 9
2
votes
1 answer

waf using recurse and keep tasks in order

I'm using waf to build and run a gtest. If I put everything in my root wscript like the following it works. def build( bld ): # build hello world lib bld.recurse("src/cpp/hw") # build hello world gtest app cppUnitTest =…
MLoga
  • 53
  • 5
2
votes
1 answer

Can I run an interactive command?

I'm new to waf and trying to implement an analogue to a GNU make trick I often use: gdb: application.elf gdb -x gdbinit-debug $< That is, allow 'make gdb' to launch an interactive GDB session for debugging. I've written a GDB task for waf, a…
Carl Norum
  • 219,201
  • 40
  • 422
  • 469
2
votes
1 answer

run python tests with waf_unit_test

I have an application written in c++ and tests for it. Partially written on c++ and partially on python. With c++ tests everything is clear. How I can run python based tests in the same build phase? The following code does not run my python file…
denys
  • 2,437
  • 6
  • 31
  • 55
2
votes
1 answer

How to organize test resource files when using waf

I am using Google Tests in a project with waf as a build system. I want to know an effective way of dealing with resource files. For a directory structure like the following: MyProject ├── build ├── src | ├──do_something.cpp | …
Kevin
  • 4,070
  • 4
  • 45
  • 67
2
votes
1 answer

Getting waf to output solution to another directory

I recently wrote this simple waf build script: #! /usr/bin/env python # encoding: utf-8 def options(opt): opt.load('compiler_cxx') opt.load('msvs') def configure(conf): conf.load('compiler_cxx') def build(bld): …
Coder32
  • 181
  • 1
  • 10
2
votes
1 answer

How to create a directory when building with waf

As part of my build, I need to create a directory. With waf, I can, for example, create symlinks with Build.BuildContext.symlink_as. But I can not find something like mkdir. What is the best way to create an empty directory (ideally at install…
Damascus Steel
  • 323
  • 1
  • 2
  • 13
2
votes
1 answer

waf does not correctly detect C++ #include dependencies

I have C++ header file dependencies that I specify in my waf script with the includes=... parameter to bld.program(). I know the waf build configuration sees the includes because my program compiles correctly. However, when I change a header file,…
jsp
  • 1,225
  • 11
  • 21
2
votes
0 answers

How to use waf to build multiple Python packages?

I am looking for using waf as a meta-build solution for orchestrating the build of multiple python packages. These packages do already have working build scripts (bash) which tests and produce artefacts (python source tar.gz and wheel files).…
sorin
  • 161,544
  • 178
  • 535
  • 806
2
votes
1 answer

Python Error while building code using waf

I had code that worked fine. I shut down my PC (Ubuntu) and then, built the same software (ns-3) and now I get the error: Traceback (most recent call last): File "./waf", line 148, in Scripting.prepare(t, cwd, VERSION, wafdir) File…
ferrer
  • 135
  • 3
  • 10
2
votes
1 answer

Using pg_config with waf

I use waf as my build system and I want to compile a small C program using Postgres. I have included postgres.h in my program so I need to find the path to it in my wscript file. I know that I can get the path I need by running: pg_config…
Elektito
  • 3,863
  • 8
  • 42
  • 72