Hi Pjotr, Pjotr Prins <pjotr.publi...@thebird.nl> 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 “out” and “debug” as its outputs, it must always produce both. Then users can choose to install only one or both, but that’s a different issue. For instance, ‘glibc’ always produces both “out” and “debug”, 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 > (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’.