[build2] How to have temporary files in /tmp
Boris Kolpackov
boris at codesynthesis.com
Wed Aug 1 10:59:50 UTC 2018
Heck Fy <shitpoet at gmail.com> writes:
> I try to create minimalist setup with build2 without additional directories
> and files - just one buildfile (like one could have with make and
> Makefile).
While this setup is supported (called 'simple project'), it has so many
restrictions and limitations that it's hardly usable for anything but,
well, really simple projects.
More specifically, such a project cannot use build system modules that
require bootstrapping. This includes test, install, dist, and config
modules. Without the config module there is no support for persistent
configurations.
> Currently I can compile my project using just single buildfile but all
> intermediate files (.o, .d, .ii, .pcm) are placed in the same folder.
>
> How to configure build2 to place this files in another folder?
If such a simple project is in directory hello/, then you can do an
out-of-source build like this:
$ ls
hello/
$ b hello/@hello-out/
$ ls
hello/
hello-out/
But because there is no persistent configurations, you cannot "configure"
it, you have to keep specifying the output directory explicitly.
> And if possible output binary file back to the project folder?
This is possible (see forwarded configurations in b(1)) but again not
with simple projects.
> And do all this without creation of additional configuration files
> or directories besides the single buildfile I already have in my
> project folder.
Those additional files are there for good reasons. My suggestion is,
don't fight it, just create a canonical project with bdep-new(1) and
go with the flow. You will have a much better time ;-).
More information about the users
mailing list