Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Sep 2014 23:23:31 +0200
From:      =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= <fernando.apesteguia@gmail.com>
To:        FreeBSD Mailing List <freebsd-ports@freebsd.org>
Subject:   On Docs option and custom build target
Message-ID:  <CAGwOe2aJWSNnG8YBuBpxjtE7S_bN5NkWwaiKWDmQzJmWMQUDoQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGwOe2aJWSNnG8YBuBpxjtE7S_bN5NkWwaiKWDmQzJmWMQUDoQ>