From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Question related to outputs Date: Wed, 15 Mar 2017 17:24:47 +0100 Message-ID: <871sty8q40.fsf@gnu.org> References: <20170314151402.GA15269@mail.thebird.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coBjK-00041c-47 for guix-devel@gnu.org; Wed, 15 Mar 2017 12:24:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coBjG-0000qh-2q for guix-devel@gnu.org; Wed, 15 Mar 2017 12:24:54 -0400 In-Reply-To: <20170314151402.GA15269@mail.thebird.nl> (Pjotr Prins's message of "Tue, 14 Mar 2017 15:14:02 +0000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pjotr Prins Cc: guix-devel Hi Pjotr, Pjotr Prins skribis: > In a package I have targets for out and debug. Now I want to tell the > make file to build different targets > > make -f Makefile.guix build-with-checks > > make -f Makefile.guix build-without-checks > > The latter would be the debug with built in bounds checking etc. > > After an hour of searching I don't find any example. Packages like git > have multiple outputs, e.g. git:send-email but I it simply expands > paths. Is there a way to test for these targets? > > (if build-without-checks (do this) (do that)) Packages with multiple outputs map to derivations with multiple outputs. Outputs are unconditional. So if your package declares =E2=80=9Cout=E2=80=9D and =E2=80=9Cdebug=E2=80= =9D as its outputs, it must always produce both. Then users can choose to install only one or both, but that=E2=80=99s a different issue. For instance, =E2=80=98glibc=E2=80=99 always produces both =E2=80=9Cout=E2= =80=9D and =E2=80=9Cdebug=E2=80=9D, but you can choose which one to install. > In gnu/packages/python.scm:L268 > > (let ((out (assoc-ref outputs "out")) > (tk (assoc-ref outputs "tk"))) > (when tk=20 > (match (find-files out "tkinter.*\\.so") > ... > > looks faulty to me as tk always expands to an outputs path. It can also be #f in the case of python-minimal. HTH! Ludo=E2=80=99.