[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap.
From: |
zimoun |
Subject: |
[bug#46806] [PATCH] gnu: ocaml-4.07: Bootstrap. |
Date: |
Wed, 03 Mar 2021 13:54:39 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi Julien,
>>From ed2c4c1c221eb60ddc9e47b58c03d9194c6a2beb Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Sat, 27 Feb 2021 00:07:30 +0100
> Subject: [PATCH 2/2] gnu: ocaml-4.07: Bootstrap.
>
> * gnu/packages/ocaml.scm (ocaml-4.07): Implement bootstrap via camlboot.
> ---
[...]
> -(define-public ocaml-4.07
> +;; This package is a bootstrap package for ocaml-4.07. It builds from
> camlboot,
> +;; using the upstream sources for ocaml 4.07. It installs a bytecode ocamllex
> +;; and ocamlc, the bytecode interpreter ocamlrun, and generated .depend files
> +;; that we otherwise remove for bootstrap purposes.
> +(define ocaml-4.07-boot
> (package
> (inherit ocaml-4.09)
> (version "4.07.1")
> @@ -267,11 +271,149 @@ functional, imperative and object-oriented styles of
> programming.")
> "/ocaml-" version ".tar.xz"))
[...]
> + (for-each
> + (lambda (file)
With my config (with could be wrong), it spots out an indentation issue here.
> + (copy-file file (string-append "boot/" (basename file))))
> + (cons* "stdlib/stdlib.cma" "stdlib/std_exit.cmo"
> "stdlib/camlheader"
> + (find-files "stdlib" ".*.cmi$")))
> + (symlink "../byterun/libcamlrun.a" "boot/libcamlrun.a")
> + (make "parsing/parser.mli"); required for
> ocamldoc/stdlib_non_prefixed
It seems better to have extra space between the closing parenthesis and
the semi colon.
> + ;; required for dependencies
> + (make "-C" "tools"
> + "CAMLC=../boot/ocamlc -nostdlib -I ../boot -use-prims
> ../byterun/primitives -I .."
> + "make_opcodes" "cvt_emit")
> + ;; generate all remaining .depend files
> + (make "alldepend"
> + (string-append "ocamllex=" (getcwd) "/boot/ocamlrun "
> + (getcwd) "/boot/ocamllex")
> + (string-append "CAMLDEP=" (getcwd) "/boot/ocamlc -depend")
> + (string-append "OCAMLDEP=" (getcwd) "/boot/ocamlc
> -depend")
> + (string-append "ocamldep=" (getcwd) "/boot/ocamlc
> -depend"))
Indentation issue?
> + ;; Build ocamllex
> + (make "CAMLC=boot/ocamlc -nostdlib -I boot -use-prims
> byterun/primitives"
> + "ocamlc")
Here too?
> + ;; Build ocamlc
> + (make "-C" "lex"
> + "CAMLC=../boot/ocamlc -strict-sequence -nostdlib -I
> ../boot -use-prims ../byterun/primitives"
> + "all")))
> + (replace 'install
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (bin (string-append out "/bin"))
> + (depends (string-append out "/share/depends")))
> + (mkdir-p bin)
> + (mkdir-p depends)
> + (install-file "ocamlc" bin)
> + (install-file "lex/ocamllex" bin)
> + (for-each
> + (lambda (file)
> + (let ((dir (string-append depends "/" (dirname file))))
> + (mkdir-p dir)
> + (install-file file dir)))
> + (find-files "." "^\\.depend$"))))))))
Maybe here too?
Cheers,
simon