vslavik/bakefile — pull request #40 by vadz (2014-09-13 00:33:52+00:00)
Title: Simplify paths under the build directory in gnu toolset output.

This ended up as an almost embarrassingly simple change, finally. Please let
me know what did I miss this time...

NB: I didn't really test it yet, just ran the tests and rebaked a couple of simple
makefiles so far, I'll do more extensive tests later, but at a first glance this seems
to do exactly what I wanted.

----
Instead of using @top_srcdir/$(builddir)/$(subdir) everywhere, which resulted
in complex paths when the bakefile itself wasn't in the top_srcdir, use a
helper _builddir make variable defined only once.

In addition to making the generated makefiles shorter and simpler, this also
allows to use just "make target" with them instead of having to explicitly use
something like "make ../build/target" even when builddir was not set.

Finally, as an extra bonus, defining the helper variable allows us to create
the build directory automatically, while it had to be done manually before
building before.