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