unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pjotr Prins <pjotr.public12@thebird.nl>
To: Pjotr Prins <pjotr.public12@thebird.nl>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Question related to outputs
Date: Tue, 14 Mar 2017 15:22:49 +0000	[thread overview]
Message-ID: <20170314152249.GA15340@mail.thebird.nl> (raw)
In-Reply-To: <20170314151402.GA15269@mail.thebird.nl>

On Tue, Mar 14, 2017 at 03:14:02PM +0000, Pjotr Prins wrote:
> 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))

When I look in the bag for git, all outputs are always defined and they are all available at build time.

#<<bag> name: "git-2.11.0" system: "x86_64-linux" target: #f build-inputs: (("source" #<origin "mirror://kernel.org/software/scm/git/git-2.11.0.tar.xz" pz7i22oussesg45yoadwos7fqifexqpplfvacf6qh2rrneiz7ufq () 3ad8000>) ("native-perl" #<package perl@5.24.0 gnu/packages/perl.scm:48 1e46c00>) ("gettext" #<package gettext-minimal@0.19.8.1 gnu/packages/gettext.scm:38 31e4300>) ("git-manpages" #<origin "mirror://kernel.org/software/scm/git/git-manpages-2.11.0.tar.xz" wpj6pcbjyc3jw4t2vssap3h6eonenwz7gvhrmge7pj6bbl4vfdma () 3c0f480>) ("tar" #<package tar@1.29 gnu/packages/bootstrap.scm:146 3c3de40>) ("gzip" #<package gzip@1.8 gnu/packages/bootstrap.scm:146 3c3dcc0>) ("bzip2" #<package bzip2@1.0.6 gnu/packages/bootstrap.scm:146 3c3db40>) ("xz" #<package xz@5.2.2 gnu/packages/bootstrap.scm:146 3c3d9c0>) ("file" #<package file@5.28 gnu/packages/bootstrap.scm:146 3c3d840>) ("diffutils" #<package diffutils@3.5 gnu/packages/bootstrap.scm:146 3c3d6c0>) ("patch" #<package patch@2.7.5 gnu/packages/bootstrap.scm:146 3c3d540>) ("sed" #<package sed@4.2.2 gnu/packages/bootstrap.scm:146 3c3d3c0>) ("findutils" #<package findutils@4.6.0 gnu/packages/bootstrap.scm:146 3c3d240>) ("gawk" #<package gawk@4.1.4 gnu/packages/bootstrap.scm:146 3c3d0c0>) ("grep" #<package grep@2.25 gnu/packages/bootstrap.scm:146 3c39000>) ("coreutils" #<package coreutils@8.25 gnu/packages/bootstrap.scm:146 3c39240>) ("make" #<package make@4.2.1 gnu/packages/bootstrap.scm:146 3c393c0>) ("bash" #<package bash@4.4.0 gnu/packages/bootstrap.scm:146 3c39900>) ("ld-wrapper" #<package ld-wrapper@0 gnu/packages/commencement.scm:823 3c39540>) ("binutils" #<package binutils@2.27 gnu/packages/bootstrap.scm:146 3c37000>) ("gcc" #<package gcc@4.9.4 gnu/packages/commencement.scm:715 3c39b40>) ("libc" #<package glibc@2.24 gnu/packages/commencement.scm:618 3c37240>) ("locales" #<package glibc-utf8-locales@2.24 gnu/packages/commencement.scm:813 3c39600>)) host-inputs: (("curl" #<package curl@7.50.3 gnu/packages/curl.scm:41 294c300>) ("expat" #<package expat@2.2.0 gnu/packages/xml.scm:53 3ad4e40>) ("openssl" #<package openssl@1.0.2j gnu/packages/tls.scm:231 2840840>) ("perl" #<package perl@5.24.0 gnu/packages/perl.scm:48 1e46c00>) ("python" #<package python@2.7.12 gnu/packages/python.scm:115 34833c0>) ("zlib" #<package zlib@1.2.8 gnu/packages/compression.scm:52 2a83540>) ("perl-cgi" #<package perl-cgi@4.35 gnu/packages/web.scm:1750 3428900>) ("subversion" #<package subversion@1.8.17 gnu/packages/version-control.scm:685 3aec600>) ("perl-term-readkey" #<package perl-term-readkey@2.32 gnu/packages/perl.scm:5951 21c8e40>) ("perl-authen-sasl" #<package perl-authen-sasl@2.16 gnu/packages/web.scm:950 3411d80>) ("perl-net-smtp-ssl" #<package perl-net-smtp-ssl@1.03 gnu/packages/web.scm:2746 3447a80>) ("perl-io-socket-ssl" #<package perl-io-socket-ssl@2.038 gnu/packages/web.scm:2517 34370c0>) ("tcl" #<package tcl@8.6.4 gnu/packages/tcl.scm:38 38969c0>) ("tk" #<package tk@8.6.4 gnu/packages/tcl.scm:136 3896840>)) target-inputs: () outputs: ("out" "send-email" "svn" "gui") arguments: (#:system "x86_64-linux" #:make-flags (quasiquote ("V=1" "NO_INSTALL_HARDLINKS=indeed")) #:test-target "test" #:tests? #f #:configure-flags (list (string-append "--with-tcltk=" (assoc-ref %build-inputs "tk") "/bin/wish8.6")) #:modules ((srfi srfi-1) (guix build gnu-build-system) (guix build utils) (guix build gremlin) (guix elf)) #:phases (modify-phases %standard-phases (add-after (quote configure) (quote patch-makefile-shebangs) (lambda _ (substitute* "Makefile" (("/bin/sh") (which "sh")) (("/usr/bin/perl") (which "perl")) (("/usr/bin/python") (which "python"))))) (add-after (quote configure) (quote add-PM.stamp) (lambda _ (call-with-output-file "perl/PM.stamp" (const #t)) #t)) (add-after (quote install) (quote install-shell-completion) (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (completions (string-append out "/etc/bash_completion.d"))) (mkdir-p completions) (copy-file "contrib/completion/git-completion.bash" (string-append completions "/git")) #t))) (add-after (quote install) (quote split) (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (se (assoc-ref outputs "send-email")) (svn (assoc-ref outputs "svn")) (gui (assoc-ref outputs "gui")) (gitk (string-append out "/bin/gitk")) (gitk* (string-append gui "/bin/gitk")) (git-gui (string-append out "/libexec/git-core/git-gui")) (git-gui* (string-append gui "/libexec/git-core/git-gui")) (git-cit (string-append out "/libexec/git-core/git-citool")) (git-cit* (string-append gui "/libexec/git-core/git-citool")) (git-se (string-append out "/libexec/git-core/git-send-email")) (git-se* (string-append se "/libexec/git-core/git-send-email")) (git-svn (string-append out "/libexec/git-core/git-svn")) (git-svn* (string-append svn "/libexec/git-core/git-svn")) (git-sm (string-append out "/libexec/git-core/git-submodule"))) (mkdir-p (string-append gui "/bin")) (mkdir-p (string-append gui "/libexec/git-core")) (mkdir-p (string-append se "/libexec/git-core")) (mkdir-p (string-append svn "/libexec/git-core")) (for-each (lambda (old new) (copy-file old new) (delete-file old) (chmod new 365)) (list gitk git-gui git-cit git-se git-svn) (list gitk* git-gui* git-cit* git-se* git-svn*)) (wrap-program git-svn* (quasiquote ("PATH" ":" prefix ((unquote (string-append (assoc-ref inputs "subversion") "/bin"))))) (quasiquote ("PERL5LIB" ":" prefix (unquote (map (lambda (i) (string-append (assoc-ref inputs i) "/lib/perl5/site_perl")) (quote ("subversion" "perl-term-readkey")))))) (quasiquote ("LD_LIBRARY_PATH" ":" prefix ((unquote (string-append (assoc-ref inputs "subversion") "/lib")))))) (wrap-program git-se* (quasiquote ("PERL5LIB" ":" prefix (unquote (map (lambda (o) (string-append o "/lib/perl5/site_perl")) (list (assoc-ref inputs "perl-authen-sasl") (assoc-ref inputs "perl-net-smtp-ssl") (assoc-ref inputs "perl-io-socket-ssl") (assoc-ref inputs "perl-gssapi") (assoc-ref inputs "perl-digest-hmac") (assoc-ref inputs "perl-uri") (assoc-ref inputs "perl-net-ssleay"))))))) (wrap-program (string-append out "/share/gitweb/gitweb.cgi") (quasiquote ("PERL5LIB" ":" prefix (unquote (map (lambda (o) (string-append o "/lib/perl5/site_perl")) (list (assoc-ref inputs "perl-cgi") (assoc-ref inputs "perl-html-parser"))))))) (wrap-program git-sm (quasiquote ("PATH" ":" prefix ((unquote (string-append (assoc-ref inputs "perl") "/bin")))))) (wrap-program (string-append out "/bin/git") (quasiquote ("PATH" ":" prefix ("$HOME/.guix-profile/libexec/git-core"))))))) (add-after (quote split) (quote install-man-pages) (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (man (string-append out "/share/man")) (manpages (assoc-ref inputs "git-manpages"))) (mkdir-p man) (with-directory-excursion man (zero? (system* "tar" "xvf" manpages)))))))) build: #<procedure gnu-build (store name input-drvs #:key guile outputs search-paths configure-flags make-flags out-of-source? tests? test-target parallel-build? parallel-tests? patch-shebangs? strip-binaries? strip-flags strip-directories validate-runpath? phases locale system build imported-modules modules substitutable? allowed-references disallowed-references)>>


Pj.

  reply	other threads:[~2017-03-14 15:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-14 15:14 Question related to outputs Pjotr Prins
2017-03-14 15:22 ` Pjotr Prins [this message]
2017-03-15 16:24 ` Ludovic Courtès
2017-03-15 20:32   ` Pjotr Prins
2017-03-16  9:02     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170314152249.GA15340@mail.thebird.nl \
    --to=pjotr.public12@thebird.nl \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).