Introducing some "global" build out-of-source variable
Mojca Miklavec
mojca at macports.org
Fri Mar 23 20:10:33 UTC 2018
On 23 March 2018 at 19:26, Rainer Müller <raimue at macports.org> wrote:
> On 2018-03-23 17:52, Mojca Miklavec wrote:
>> I would like to propose introducing some "build-out-of-source"
>> variable that would work for any build system (CMake, meson,
>> configure, ...).
> For cmake, you run in the build directory, specifying the path to the
> source directory.
>
> configure.dir ${workpath}/build
> configure.cmd cmake
> configure.post_args ${worksrcpath}
>
> For meson, you run in the source directory, specifying the path to the
> build directory.
>
> build.dir ${workpath}/build
> configure.cmd meson
> configure.post_args ${configure.dir} ${build.dir}
>
> I see no way to unify this or do anything clever about it in base.
> So what would such an option do?
Oh, I'm not actually looking to do all these steps for any given build
systems in base. What I would like to have is merely a global option
like
build.out_of_source yet
which those different PortGroups would use to decide whether or not to
do something different.
I would then merely change the cmake PG from
if {[option cmake.out_of_source]} {
...
}
into
if {[option build.out_of_source]} {
...
}
etc.
Meson PG would set that variable to yes and/or ignore the setting
since it cannot build otherwise anyway.
In the absence of any PortGroup implementing the build system, this
should make sure that autotools-based ports would properly build out
of source without changing anything else.
Mojca
More information about the macports-dev
mailing list