Introducing some "global" build out-of-source variable
Ryan Schmidt
ryandesign at macports.org
Sat Mar 24 07:06:44 UTC 2018
On Mar 24, 2018, at 02:00, Mojca Miklavec wrote:
> Another question just popped up in one of the tickets: "When does base
> create ${configure.dir} and ${build.dir}?" I believe the answer is
> never, but I believe half of the problem could probably be solved if
> all a port needed to do was
>
> configure.dir ${workpath}/build
>
> and then build.dir would also point to ${configure.dir} automatically
> and both would be created automatically when not existing. (There
> might be undesired side effects, I don't know, at this point I don't
> want to claim that this is necessarily a good idea, just a thought.)
Since MacPorts base does not currently know about out-of-source builds, it assumes the build occurs inside the source directory, which should exist after extracting, so I don't think MacPorts currently makes any attempts to create the configure/build directory.
> One particular port tried to use
>
> configure.dir ${workpath}/build
> build.dir ${configure.dir}
> pre-configure {
> file mkdir ${configure.dir}
> }
>
> which failed because the PortGroup was already expecting
> ${configure.dir} to exist as it did something else with it in its own
> pre-configure step (which gets executed before the one specified in
> the port), so the workaround was to use the pretty counter-intuitive
>
> post-patch {
> file mkdir ...
> }
I agree that's not ideal.
> But some build systems require it,
Meson? So its portgroup takes care of doing that.
> I don't know what our muniversal PG is doing ...
It's supposed to support both in-source and out-of-source builds.
More information about the macports-dev
mailing list