[build2] [bug] Targets not built if not used by the first target appearing in a buildfile
Klaim - Joël Lamotte
mjklaim at gmail.com
Sat Mar 24 14:54:39 UTC 2018
On 24 March 2018 at 14:01, Boris Kolpackov <boris at codesynthesis.com> wrote:
>
> By default build2 builds the directory alias target (./). If you
> don't mention this target explicitly in your buildfile, then build2
> will create it with the first target mentioned in the buildfile
> being its sole prerequisite. So something like this:
>
> exe{hello}: cxx{hello}
>
> Is equivalent to:
>
> ./: exe{hello}
> exe{hello}: cxx{hello}
>
> In your case, if you want to build exe{} and all the lib{} targets,
> then you can do:
>
> ./: exe{app} liba{lib_x lib_y lib_z}
>
> Boris
>
Ok I see, it makes sense now. Sorry, I wasn't aware of this at all! ^^;
As the implicit shortcut is used almost everywhere and works well by
default I didn't realize it looking at other repos.
I don't remember reading that in the doc but if it already is specified
could you
point me to it so that I can point it to my colleagues.
Thank you very much.
A. Joël Lamotte
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.build2.org/archives/users/attachments/20180324/c8c5870b/attachment.html>
More information about the users
mailing list