On Docs option and custom build target

Fernando Apesteguía fernando.apesteguia at gmail.com
Tue Sep 23 21:23:33 UTC 2014


Hi,

I have a Makefile for an application that provides both examples and
documentation. I created the two options in the Makefile (both enabled
by default).
The package doesn't provide any flags stock like --with-docs or
--with-examples, so I have a custom target like this:

do-build:
        @cd ${BUILD_WRKSRC}/ && ${MAKE}
.if ${PORT_OPTIONS:MDOCS}
        @cd ${BUILD_WRKSRC}/ && ${MAKE_CMD} doc
.endif

(Just FYI, the enabling/disabling of the examples is done in the
post-patch target by modifying a CMakeList.txt...)

I tried the four combinations of the options through port test and
everything went fine.

However, when I try to run this in poudriere, I get the following error:

make[1]: don't know how to make doc. Stop

make[1]: stopped in /wrkdirs/usr/ports/graphics/code-eli/work/.build
*** Error code 2

Since it builds the normal package, and it tries to execute make doc,
it was able to change the directory to BUILD_WRKSRC.

I assume I'm doing something fundamentally wrong, but I can't figure
out what it is.

Any help is appreciated.

Thanks in advance.


More information about the freebsd-ports mailing list