[build2] Out of tree questions
Boris Kolpackov
boris at codesynthesis.com
Tue Nov 28 13:40:40 UTC 2017
Moldmann Max (DC-MH/ENG52-NA) <Max.Moldmann at boschrexroth-us.com> writes:
> 1. Is there a way to run a build clean from the src folder to clean the
> bld folder?
>
> This command cleans the src folder but tries to build the bld folder:
>
> build2-test\src>b clean ./@../bld/
> info: dir{.\} is clean
> info: dir{..\bld\} is up to date
Yes:
$ b clean: ./@../bld/
You can read more on the buildspec in b(1):
https://build2.org/build2/doc/b.xhtml
> 2. The out of tree build output adds the @ string at the end and
> repeats all the subdirectories (can be become very noisy for
> production code). Is there a way that I could get the clean
> in tree build output even while doing an out of tree build?
This shows what is being compiled and where it is placed. We found
this is quite useful in order not to loose track of things and to be
honest extra "noise" hasn't bothered us at all. But if you want more
compact output, you can build from out (i.e., CWD is out tree). For
example:
$ b hello0/@out/
c++ hello0/cxx{hello}@out/
ld out/exe{hello}
$ cd out/
$ b ../hello0/@./
c++ ../hello0/cxx{hello}
ld exe{hello}
Also, if you configure the output directory, you can drop the src
path. This is how we normally roll:
$ b configure: hello0/@out/
$ cd out/
$ b
c++ ../hello0/cxx{hello}
ld exe{hello}
Boris
More information about the users
mailing list