A project with it's own Makefiles

Adam Weinberger adamw at adamw.org
Wed Nov 15 13:25:28 UTC 2017


> On 15 Nov, 2017, at 1:08, blubee blubeeme <gurenchan at gmail.com> wrote:
> 
> I have a port that has a it's own Makefiles that you're suppose to call to
> build for example the folder structure is like this:
> 
> project
> --subfolderA
> ---subfolderA-src
> ---subfolderA-Makefile
> 
> --subfolderB
> ---subfolderB-src
> ---subfolderB-Makefile
> 
> --subfolderC
> ---subfolderC-src
> ---subfolderC-Makefile
> 
> you're suppose to choose which sets of examples you want to build.
> 
> To port this to FreeBSD do I have to write a cmake or makefile to
> encapsulate these sub directories or is there tools already in place to
> build this?

Your best bet is to use the under-appreciated DO_MAKE_BUILD macro. It sets the make environment and args properly.

do-build:
	${DO_MAKE_BUILD} -C ${WRKSRC}/subfolderA
	${DO_MAKE_BUILD} -C ${WRKSRC}/subfolderB

# Adam


-- 
Adam Weinberger
adamw at adamw.org
https://www.adamw.org



More information about the freebsd-ports mailing list