gnu: commencement: Return #t from all phases.

While at it, remove useless (and ...) indirections, because the procedures
never return #f anyway: instead they would raise an exception upon failure.

* gnu/packages/commencement.scm (mes-boot, tcc-boot0, tcc-boot,
diffutils-mesboot, binutils-mesboot0, gcc-core-mesboot, gcc-mesboot0,
glibc-headers-mesboot, glibc-mesboot, gnu-make-boot0): Return #t from phases
and remove (and ...) blocks.
This commit is contained in:
Marius Bakke 2019-06-17 21:18:54 +02:00
parent 70530036b8
commit 2b5e412b30
No known key found for this signature in database
GPG Key ID: A2A06DF2A33A54FA
1 changed files with 63 additions and 66 deletions

View File

@ -106,11 +106,10 @@
(let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))
(bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
(with-directory-excursion ".."
(and
(mkdir-p "nyacc-source")
(invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source)
(symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed")
#t)))))
(symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed"))
#t)))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref %outputs "out")))
@ -130,12 +129,11 @@
(invoke "sh" "bootstrap.sh"))))
(replace 'check
(lambda _
(and
(setenv "DIFF" "sh scripts/diff.scm")
;; fail fast tests
;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/63-struct-cell")
(invoke "sh" "check.sh"))))
(invoke "sh" "check.sh")))
(replace 'install
(lambda _
(invoke "sh" "install.sh"))))))
@ -201,12 +199,11 @@
coreutils "/bin"))
(format (current-error-port) "PATH=~s\n" (getenv "PATH"))
(with-directory-excursion ".."
(and
(mkdir-p "nyacc-source")
(invoke "tar" "--strip=1" "-C" "nyacc-source"
"-xvf" nyacc-source)
(symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed")
#t)))))
(symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed"))
#t)))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref %outputs "out"))
@ -353,7 +350,6 @@
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref %outputs "out"))
(tcc (assoc-ref %build-inputs "tcc")))
(and
(mkdir-p (string-append out "/bin"))
(copy-file "tcc" (string-append out "/bin/tcc"))
(mkdir-p (string-append out "/lib/tcc"))
@ -366,7 +362,7 @@
(copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
(delete-file (string-append out "/lib/tcc/libtcc1.a"))
(copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
#t))))))))))
#t)))))))))
(define make-mesboot0
(package-with-bootstrap-guile
@ -413,7 +409,8 @@
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin")))
(install-file "make" bin))))))))))
(install-file "make" bin)
#t)))))))))
(define diffutils-mesboot
(package-with-bootstrap-guile
@ -457,8 +454,8 @@
(add-before 'configure 'remove-diff3-sdiff
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "Makefile.in"
(("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))))))))))
(("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))
#t))))))))
(define binutils-mesboot0
(package-with-bootstrap-guile
@ -585,7 +582,8 @@
(lambda _
(display "
ac_cv_c_float_format='IEEE (little-endian)'
"))))))
")))
#t)))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port)
@ -603,7 +601,6 @@ ac_cv_c_float_format='IEEE (little-endian)'
(out (assoc-ref outputs "out"))
(gcc-dir (string-append
out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
(and
(mkdir-p "tmp")
(zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
(zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
@ -619,7 +616,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
(invoke "ls" "-ltrF" gcc-dir)
(copy-recursively (string-append tcc "/include")
(string-append out "/include"))
#t)))))))
#t))))))
(native-search-paths
;; Use the language-specific variables rather than 'CPATH' because they
;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
@ -818,11 +815,11 @@ ac_cv_c_float_format='IEEE (little-endian)'
(let* ((out (assoc-ref outputs "out"))
(gcc-dir (string-append
out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
(and
(mkdir-p "tmp")
(zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
(zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
(copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))))))))
(copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
#t)))))
((#:configure-flags configure-flags)
`(let ((out (assoc-ref %outputs "out")))
`("--disable-shared"
@ -1179,14 +1176,15 @@ exec " gcc "/bin/" program
(("/bin/pwd") (string-append coreutils "/bin/pwd")))
(setenv "C_INCLUDE_PATH" (string-append libc "/include"
headers "/include"))
(setenv "LIBRARY_PATH" (string-append libc "/lib")))))
(setenv "LIBRARY_PATH" (string-append libc "/lib"))
#t)))
(replace 'install
(lambda* (#:key outputs make-flags #:allow-other-keys)
(let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out")))
(and (apply invoke "make" make-flags)
(apply invoke "make" make-flags)
(copy-recursively kernel-headers out)
#t))))
#t)))
(replace 'configure
(lambda* (#:key configure-flags #:allow-other-keys)
(format (current-error-port) "running ../configure ~a\n" (string-join configure-flags))
@ -1237,9 +1235,9 @@ exec " gcc "/bin/" program
(let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
(out (assoc-ref outputs "out"))
(install-flags (cons "install" make-flags)))
(and (apply invoke "make" install-flags)
(apply invoke "make" install-flags)
(copy-recursively kernel-headers out)
#t)))))))))
#t))))))))
(native-search-paths ;; FIXME: move to glibc-mesboot0
;; Use the language-specific variables rather than 'CPATH' because they
;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
@ -1413,8 +1411,7 @@ exec " gcc "/bin/" program
`(modify-phases ,phases
(replace 'build
(lambda _
(invoke "./build.sh")
#t))
(invoke "./build.sh")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))