working directory in nested projects

123 views Asked by At

I have a background in autotools and I am used to make use of top_srcdir, top_builddir, srcdir and builddir.

When I have nested projects, the working directory will change to the one where I define my Makefile.am in the project.

However, in waf, I am converting a project that has two subprojects inside:

  • Static library.
  • Program.

With this structure:

  • root/wscript (this recurses into subprojects).
  • root/myprogram/wscript
  • root/mylib/wscript

When I put these together in a superproject, I see that now, the working directory, no matter which wscript is executed, is always root/. The equivalent with a Makefile.am in the same places would change the working directory when recursing.

  1. What is the best way to get the "typical" behaviour from autotools? I mean making use of builddir, srcdir etc.
  2. What are the best practices in waf regarding to this problem? Is it done in another novel way I don't know of?
0

There are 0 answers