Source code in subdirectory

Ryan Schmidt ryandesign at macports.org
Fri Sep 7 20:59:19 UTC 2018



On Sep 7, 2018, at 15:42, Watson Ladd wrote:

> I'm trying to write a portfile for Macauly 2 and it is complicated by
> the fact that all the build commands have to be executed in a
> subdirectory. Does anyone have any tips? The guide doesn't seem to say
> much about this as far as I can tell.

Set build.dir to that subdirectory. For example, if you need to build in a "build" subdirectory of the main directory, you might use:

build.dir ${worksrcpath}/build

Many ports do these so-called "out-of-source" builds. The cmake 1.1 portgroup has an implementation of it that many ports share, for example.



More information about the macports-users mailing list