guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question related to outputs


From: Pjotr Prins
Subject: Re: Question related to outputs
Date: Tue, 14 Mar 2017 15:22:49 +0000
User-agent: Mutt/1.6.2 (2016-07-01)

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 address@hidden gnu/packages/perl.scm:48 1e46c00>) 
("gettext" #<package address@hidden 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 address@hidden gnu/packages/bootstrap.scm:146 3c3de40>) ("gzip" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3dcc0>) ("bzip2" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3db40>) ("xz" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d9c0>) ("file" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d840>) ("diffutils" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d6c0>) ("patch" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d540>) ("sed" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d3c0>) ("findutils" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d240>) ("gawk" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c3d0c0>) ("grep" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c39000>) ("coreutils" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c39240>) ("make" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c393c0>) ("bash" 
#<package address@hidden gnu/packages/bootstrap.scm:146 3c39900>) ("ld-wrapper" 
#<package address@hidden gnu/packages/commencement.scm:823 3c39540>) 
("binutils" #<package address@hidden gnu/packages/bootstrap.scm:146 3c37000>) 
("gcc" #<package address@hidden gnu/packages/commencement.scm:715 3c39b40>) 
("libc" #<package address@hidden gnu/packages/commencement.scm:618 3c37240>) 
("locales" #<package address@hidden gnu/packages/commencement.scm:813 
3c39600>)) host-inputs: (("curl" #<package address@hidden 
gnu/packages/curl.scm:41 294c300>) ("expat" #<package address@hidden 
gnu/packages/xml.scm:53 3ad4e40>) ("openssl" #<package address@hidden 
gnu/packages/tls.scm:231 2840840>) ("perl" #<package address@hidden 
gnu/packages/perl.scm:48 1e46c00>) ("python" #<package address@hidden 
gnu/packages/python.scm:115 34833c0>) ("zlib" #<package address@hidden 
gnu/packages/compression.scm:52 2a83540>) ("perl-cgi" #<package address@hidden 
gnu/packages/web.scm:1750 3428900>) ("subversion" #<package address@hidden 
gnu/packages/version-control.scm:685 3aec600>) ("perl-term-readkey" #<package 
address@hidden gnu/packages/perl.scm:5951 21c8e40>) ("perl-authen-sasl" 
#<package address@hidden gnu/packages/web.scm:950 3411d80>) 
("perl-net-smtp-ssl" #<package address@hidden gnu/packages/web.scm:2746 
3447a80>) ("perl-io-socket-ssl" #<package address@hidden 
gnu/packages/web.scm:2517 34370c0>) ("tcl" #<package address@hidden 
gnu/packages/tcl.scm:38 38969c0>) ("tk" #<package address@hidden 
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 via email to

[Prev in Thread] Current Thread [Next in Thread]