From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCsY4-00078K-Dw for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCsY1-00038g-Qm for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gCsY1-00038X-FQ for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gCsY1-0006sx-By for guix-patches@gnu.org; Wed, 17 Oct 2018 16:36:05 -0400 Subject: [bug#33079] [PATCH 07/34] guix: ocaml-build-system: Replace system* with invoke. Resent-Message-ID: From: Julien Lepiller Date: Wed, 17 Oct 2018 22:34:15 +0200 Message-Id: <20181017203442.7075-7-julien@lepiller.eu> In-Reply-To: <20181017203442.7075-1-julien@lepiller.eu> References: <20181017223130.775b25fc@lepiller.eu> <20181017203442.7075-1-julien@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33079@debbugs.gnu.org * guix/build/ocaml-build-system.scm (prepare-install): Return #t. (configure, build, check, install): Use invoke instead of system*. --- guix/build/ocaml-build-system.scm | 45 +++++++++++++++++-------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/guix/build/ocaml-build-system.scm b/guix/build/ocaml-build-system.scm index d10431d8e..99111ad30 100644 --- a/guix/build/ocaml-build-system.scm +++ b/guix/build/ocaml-build-system.scm @@ -49,37 +49,40 @@ '()) ,@configure-flags))) (format #t "running 'setup.ml' with arguments ~s~%" args) - (zero? (apply system* "ocaml" "setup.ml" args))) + (apply invoke "ocaml" "setup.ml" args)) (let ((args `("-prefix" ,out ,@configure-flags))) (format #t "running 'configure' with arguments ~s~%" args) - (zero? (apply system* "./configure" args)))))) + (apply invoke "./configure" args)))) + #t) (define* (build #:key inputs outputs (build-flags '()) (make-flags '()) (use-make? #f) #:allow-other-keys) "Build the given package." (if (and (file-exists? "setup.ml") (not use-make?)) - (zero? (apply system* "ocaml" "setup.ml" "-build" build-flags)) + (apply invoke "ocaml" "setup.ml" "-build" build-flags) (if (file-exists? "Makefile") - (zero? (apply system* "make" make-flags)) + (apply invoke "make" make-flags) (let ((file (if (file-exists? "pkg/pkg.ml") "pkg/pkg.ml" "pkg/build.ml"))) - (zero? (apply system* "ocaml" "-I" - (string-append (assoc-ref inputs "findlib") - "/lib/ocaml/site-lib") - file build-flags)))))) + (apply invoke "ocaml" "-I" + (string-append (assoc-ref inputs "findlib") + "/lib/ocaml/site-lib") + file build-flags)))) + #t) (define* (check #:key inputs outputs (make-flags '()) (test-target "test") tests? (use-make? #f) #:allow-other-keys) "Install the given package." (when tests? (if (and (file-exists? "setup.ml") (not use-make?)) - (zero? (system* "ocaml" "setup.ml" (string-append "-" test-target))) + (invoke "ocaml" "setup.ml" (string-append "-" test-target)) (if (file-exists? "Makefile") - (zero? (apply system* "make" test-target make-flags)) + (apply invoke "make" test-target make-flags) (let ((file (if (file-exists? "pkg/pkg.ml") "pkg/pkg.ml" "pkg/build.ml"))) - (zero? (system* "ocaml" "-I" - (string-append (assoc-ref inputs "findlib") - "/lib/ocaml/site-lib") - file test-target))))))) + (invoke "ocaml" "-I" + (string-append (assoc-ref inputs "findlib") + "/lib/ocaml/site-lib") + file test-target))))) + #t) (define* (install #:key outputs (build-flags '()) (make-flags '()) (use-make? #f) (install-target "install") @@ -87,17 +90,19 @@ "Install the given package." (let ((out (assoc-ref outputs "out"))) (if (and (file-exists? "setup.ml") (not use-make?)) - (zero? (apply system* "ocaml" "setup.ml" - (string-append "-" install-target) build-flags)) + (apply invoke "ocaml" "setup.ml" + (string-append "-" install-target) build-flags) (if (file-exists? "Makefile") - (zero? (apply system* "make" install-target make-flags)) - (zero? (system* "opam-installer" "-i" (string-append "--prefix=" out) - (string-append "--libdir=" out "/lib/ocaml/site-lib"))))))) + (apply invoke "make" install-target make-flags) + (invoke "opam-installer" "-i" (string-append "--prefix=" out) + (string-append "--libdir=" out "/lib/ocaml/site-lib"))))) + #t) (define* (prepare-install #:key outputs #:allow-other-keys) "Prepare for building the given package." (mkdir-p (string-append (assoc-ref outputs "out") "/lib/ocaml/site-lib")) - (mkdir-p (string-append (assoc-ref outputs "out") "/bin"))) + (mkdir-p (string-append (assoc-ref outputs "out") "/bin")) + #t) (define %standard-phases ;; Everything is as with the GNU Build System except for the `configure' -- 2.18.0