From owner-freebsd-ports@FreeBSD.ORG Wed Sep 24 21:54:22 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A77D289; Wed, 24 Sep 2014 21:54:22 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0269414C; Wed, 24 Sep 2014 21:54:21 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id x13so3732992wgg.19 for ; Wed, 24 Sep 2014 14:54:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=DTuikYQE4U4O1qTgY7xJ7CCrGh5UBQI5tVtiFzVpA8Y=; b=xaCJP45SHTbRtY+RxiF3HIebudLAnU6T/GNE7kCV97Cl7OfJEpXb4pj2Z0n1Yc0Bpj w018QXvSWcRY0ZVRxFck0XS4GTW7zgR0Qf0bFbtqoQe5MLDyi3SsJIpacyoD9uvjRDQ7 Q2X9VEZ/fuEv61opXWUaAWNbamos2i2KYr7RlmXmO/nKu7v4psw5RQ2sXFlYTTVl2SJC YmrxzCoHMQPRigTM0Enldfik732YlQGNyCcO7q5VGYK8QAeHZrjMajqrX+j6LbdKGvCq Q3jTETI+OxmbYxoEkpuUwwrH1Hgyv+BPSfPKaXKhitAbrxY8Gk9maAi5aOK7qy6ODsHT b8Lg== MIME-Version: 1.0 X-Received: by 10.180.38.114 with SMTP id f18mr14358567wik.24.1411595660012; Wed, 24 Sep 2014 14:54:20 -0700 (PDT) Received: by 10.180.104.66 with HTTP; Wed, 24 Sep 2014 14:54:19 -0700 (PDT) In-Reply-To: <20140924205238.52054971@kalimero.tijl.coosemans.org> References: <20140924205238.52054971@kalimero.tijl.coosemans.org> Date: Wed, 24 Sep 2014 23:54:19 +0200 Message-ID: Subject: Re: On Docs option and custom build target From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= To: Tijl Coosemans Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Mailing List X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Sep 2014 21:54:22 -0000 On Wed, Sep 24, 2014 at 8:52 PM, Tijl Coosemans wrote: > On Tue, 23 Sep 2014 23:23:31 +0200 Fernando Apestegu=C3=ADa wrote: >> 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 > > You don't have to override do-build like this. You can build the > documentation from a post-build target. Thanks. Changed. > >> 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 > > Does the makefile in BUILD_WRKSRC actually have a doc target? Is doc > a subdirectory maybe? Yes it does. In fact, with "port test" builds fine with the same code (change directory and ${MAKE} doc). There is a doc.dir subdirectory in BUILD_WRKSRC/CMakeFiles. The doc target basically gets a Doxygen configuration file and runs doxygen on the whole library code.