gnu: ocaml: Update to 4.7.0.

Update ocaml to the latest version and fixes dependent packages by
updating them or by adding new inputs, such as ocaml-num and ocamlbuild,
that were removed from the core ocaml package. Rename packages that
cannot be built with the new compiler with an ocaml4.02 prefix. Add
ocaml4.02 dependencies.

* gnu/packages/ocaml.scm (ocaml): Update to 4.7.0.
(ocaml-4.02, ocamlbuild, camlp4-4.02, ocaml-num, ocaml4.02-menhir)
(ocaml4.02-lablgtk, ocaml4.02-findlib, ocaml4.02-ounit, ocaml4.02-camlzip)
(ocaml4.02-ocamlmod, ocaml4.02-zarith, ocaml4.02-qcheck, ocaml4.02-qtest)
(ocaml4.02-stringext, ocaml4.02-bisect, dune, ocaml-migrate-parsetree)
(ocaml-ppx-tools-versioned, ocaml-ppx-tools-versioned)
(ocaml4.02-bitstring, ocaml4.02-result, ocaml4.02-topkg, ocaml4.02-rresult)
(ocaml4.02-sqlite3, ocaml4.02-csv, ocaml4.02-mtime, ocaml4.02-cmdliner)
(ocaml4.02-fmt, ocaml4.02-astring, ocaml4.02-alcotest, ocaml4.02-ppx-tools)
(ocaml4.02-react, ocaml4.02-ssl, ocaml4.02-lwt, ocaml-lwt-log)
(ocaml4.02-lwt-log, ocaml4.02-logs, ocaml4.02-fpath, ocaml4.02-bos)
(ocaml4.02-xmlm, ocaml4.02-ulex, ocaml4.02-uchar, ocaml4.02-uutf)
(ocaml4.02-jsonm, ocaml4.02-ocurl, ocaml4.02-base64, ocaml4.02-omake)
(ocaml4.02-batteries, ocaml4.02-pcre, ocaml4.02-oasis)
(ocaml4.02-js-build-tools, ocaml4.02-cppo, ocaml-seq, ocaml4.02-seq)
(ocaml4.02-re, ocaml4.02-ocplib-endian, ocaml4.02-easy-format)
(ocaml4.02-piqilib, ocaml4.02-uuidm, ocaml4.02-graph, ocaml4.02-piqi)
(ocaml4.02-camomile, ocaml4.02-zed, ocaml4.02-lambda-term): New packages.
(opam): Update to 2.0.0.
(camlp4): Update to 4.07+1.
(camlp5): Update to 7.06.
(hevea): Update to 2.32.
(coq)[inputs]: Add ocaml-num.
(emacs-tuareg): Update to 2.2.0.
(ocaml-menhir)[native-inputs]: Add ocamlbuild.
(ocaml-lablgtk): Update to 2.18.6.
(unison)[inputs]: Use ocaml-4.02.
(ocaml-findlib): Update to 1.8.0.
(ocaml-ounit)[native-inputs]: Add ocamlbuild.
(ocamlmod): Update to 0.0.9.
(ocaml-frontc)[arguments]: Use ocaml-4.02.
(ocaml-qcheck)[native-inputs]: Add ocamlbuild.
(ocaml-qtest)[native-inputs]: Remove ocaml-findlib and add ocamlbuild.
(ocaml-stringext)[native-inputs]: Add ocamlbuild.
(ocaml-bisect): Update to 1.3.1.
(ocaml4.01-bisect): Downgrade to 1.3.
(ocaml-bitstring): Update to 3.1.0.
(ocaml-topkg)[native-inputs]: Add ocamlbuild.
(ocaml-rresult)[native-inputs]: Add ocamlbuild.
(ocaml-sqlite3)[native-inputs]: Add ocamlbuild.
(ocaml-csv)[native-inputs]: Add ocamlbuild.
(ocaml-mtime)[native-inputs]: Add ocamlbuild.
(ocaml-cmdliner)[native-inputs]: Add ocamlbuild.
(ocaml-fmt)[native-inputs]: Add ocamlbuild.
(ocaml-astring)[native-inputs]: Add ocamlbuild.
(ocaml-alcotest)[native-inputs]: Add ocamlbuild.
(ocaml-ppx-tools)[native-inputs]: Add ocamlbuild.
(ocaml-react)[native-inputs]: Add ocamlbuild.
(ocaml-ssl)[arguments]: Return #t in phases.
(ocaml-lwt): Update to 4.1.0.
(ocaml-logs)[native-inputs]: Add ocamlbuild.
(ocaml-fpath)[native-inputs]: Add ocamlbuild.
(ocaml-bos)[native-inputs]: Add ocamlbuild.
(ocaml-xmlm): Update to 1.3.0.
(ocaml-ulex): Update to 1.2.0.
(ocaml-uchar)[native-inputs]: Add ocamlbuild.
(ocaml-uutf): Update to 1.0.1.
(ocaml-jsonm): Update to 1.0.1.
(ocaml-ocurl): Update to 0.8.2.
(ocaml-base64)[native-inputs]: Add ocamlbuild.
(ocamlify)[native-inputs]: Use ocaml-4.02.
(omake): Update to 0.10.3.
(ocaml-batteries): Update to 2.9.0.
(ocaml-pcre)[native-inputs]: Add ocamlbuild.
(ocaml-expect): Update 0.0.6.
(ocaml4.02-fileutils): Update to 0.5.3.
(ocaml-oasis): Update 0.4.11.
(ocaml-js-build-tools)[native-inputs]: Add ocamlbuild.
(ocaml-bin-prot): Rename to ocaml4.02-bin-prot.
(ocaml-fieldslib): Rename to ocaml4.02-fieldslib.
(ocaml-ppx-core): Rename to ocaml4.02-ppx-core.
(ocaml-ppx-optcomp): Rename to ocaml4.02-ppx-optcomp.
(ocaml-ppx-driver): Rename to ocaml4.02-ppx-driver.
(ocaml-cppo): Update to 1.6.5.
(ocaml-ppx-deriving): Rename to ocaml4.02-ppx-deriving.
(ocaml-ppx-type-conv): Rename to ocaml4.02-ppx-type-conv.
(ocaml-ppx-inline-test): Rename to ocaml4.02-ppx-inline-test.
(ocaml-ppx-bench): Rename to ocaml4.02-ppx-bench.
(ocaml-ppx-compare): Rename to ocaml4.02-ppx-compare.
(ocaml-sexplib): Rename to ocaml4.02-sexplib.
(ocaml-typerep): Rename to ocaml4.02-typerep.
(ocaml-variantslib): Rename to ocaml4.02-variantslib.
(ocaml-ppx-sexp-conv): Rename to ocaml4.02-ppx-sexp-conv.
(ocaml-ppx-variants-conv): Rename to ocaml4.02-ppx-variants-conv.
(ocaml-ppx-here): Rename to ocaml4.02-ppx-here.
(ocaml-ppx-assert): Rename to ocaml4.02-ppx-assert.
(ocaml-ppx-enumerate): Rename to ocaml4.02-ppx-enumerate.
(ocaml-ppx-let): Rename to ocaml4.02-ppx-let.
(ocaml-ppx-typerep-conv): Rename to ocaml4.02-ppx-typerep-conv.
(ocaml-ppx-sexp-value): Rename to ocaml4.02-ppx-sexp-value.
(ocaml-ppx-pipebang): Rename to ocaml4.02-ppx-pipebang.
(ocaml-ppx-bin-prot): Rename to ocaml4.02-ppx-bin-prot.
(ocaml-ppx-fail): Rename to ocaml4.02-ppx-fail.
(ocaml-ppx-custom-printf): Rename to ocaml4.02-ppx-custom-printf.
(ocaml-ppx-sexp-message): Rename to ocaml4.02-ppx-sexp-message.
(ocaml-ppx-fields-conv): Rename to ocaml4.02-ppx-fields-conv.
(ocaml-re): Update to 1.8.0.
(ocaml-ppx-expect): Rename to ocaml4.02-ppx-expect.
(ocaml-ppx-jane): Rename to ocaml4.02-ppx-jane.
(ocaml-core-kernel): Rename to ocaml4.02-core-kernel.
(ocaml-async-kernel): Rename to ocaml4.02-async-kernel.
(ocaml-async-rpc-kernel): Rename to ocaml4.02-async-rpc-kernel.
(ocaml-core): Rename to ocaml4.02-core.
(ocaml-async-unix): Rename to ocaml4.02-async-unix.
(ocaml-async-extra): Rename to ocaml4.02-async-extra.
(ocaml-async): Rename to ocaml4.02-async.
(ocaml-ocplib-endian)[native-inputs]: Update to 1.0.
(ocaml-cstruct): Rename to ocaml4.02-cstruct.
(ocaml-hex): Rename to ocaml4.02-hex.
(ocaml-ezjsonm): Rename to ocaml4.02-ezjsonm.
(ocaml-uri): Rename to ocaml4.02-uri.
(optcomp): Use ocaml-4.02.
(ocaml-piqilib): Update to 0.6.14.
(ocaml-uuidm)[native-inputs]: Add ocamlbuild.
(ocaml-graph): Update to 1.8.8.
(ocaml-piqi): Update to 0.7.6.
(bap): Update to 1.3.0.
(ocaml-camomile): Update to 1.0.1.
(ocaml-jbuilder): Use ocaml-4.02.
(ocaml-lambda-term): Update to 1.13.
(ocaml-utop): Update to 2.2.0.
(ocaml-integers)[native-inputs]: Add ocamlbuild.
(ocaml-ctypes): Update to 0.14.0.
(ocaml-ocb-stubblr)[native-inputs]: Add ocamlbuild.
(ocaml-tsdl)[native-inputs]: Add ocamlbuild.
* gnu/packages/machine-learning.scm (ocaml-mcl): Use ocaml-4.02.
* gnu/packages/maths.scm (cubicle): Update to 1.1.2.
* gnu/packages/patches/ocaml-bisect-fix-camlp4-in-another-directory.patch:
Update patch.
* guix/build-system/ocaml.scm: (default-ocaml4.02, default-ocaml4.02-findlib)
(package-with-ocaml4.02, strip-ocaml4.02-variant): New variables.
master
Julien Lepiller 2018-11-17 17:55:44 +01:00
parent 5a0affba3f
commit 564cf93f2a
No known key found for this signature in database
GPG Key ID: 43111F4520086A0C
5 changed files with 1899 additions and 746 deletions

View File

@ -8,6 +8,7 @@
;;; Copyright © 2018 Mark Meyer <mark@ofosos.org>
;;; Copyright © 2018 Ben Woodcroft <donttrustben@gmail.com>
;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@ -300,7 +301,9 @@ networks) based on simulation of (stochastic) flow in graphs.")
"1l5jbhwjpsj38x8b9698hfpkv75h8hn3kj0gihjhn8ym2cwwv110"))))
(build-system ocaml-build-system)
(arguments
`(#:phases
`(#:ocaml ,ocaml-4.02
#:findlib ,ocaml4.02-findlib
#:phases
(modify-phases %standard-phases
(add-before 'configure 'patch-paths
(lambda _

View File

@ -28,6 +28,7 @@
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
;;;
;;; This file is part of GNU Guix.
;;;
@ -3988,37 +3989,52 @@ theories} (SMT) solver. It provides a C/C++ API, as well as Python bindings.")
(define-public cubicle
(package
(name "cubicle")
(version "1.1.1")
(version "1.1.2")
(source (origin
(method url-fetch)
(uri (string-append "http://cubicle.lri.fr/cubicle-"
version ".tar.gz"))
(sha256
(base32
"1sny9c4fm14k014pk62ibpwbrjjirkx8xmhs9jg7q1hk7y7x3q2h"))))
"10kk80jdmpdvql88sdjsh7vqzlpaphd8vip2lp47aarxjkwjlz1q"))))
(build-system gnu-build-system)
(native-inputs
`(("ocaml" ,ocaml)
`(("automake" ,automake)
("ocaml" ,ocaml)
("which" ,(@@ (gnu packages base) which))))
(propagated-inputs
`(("z3" ,z3)))
`(("ocaml-num" ,ocaml-num)
("z3" ,z3)))
(arguments
`(#:configure-flags (list "--with-z3")
#:make-flags (list "QUIET=")
#:tests? #f
#:phases
(modify-phases %standard-phases
(add-before 'configure 'configure-for-release
(lambda _
(substitute* "Makefile.in"
(("SVNREV=") "#SVNREV="))))
(("SVNREV=") "#SVNREV="))
#t))
(add-before 'configure 'fix-/bin/sh
(lambda _
(substitute* "configure"
(("/bin/sh") (which "sh")))))
(("-/bin/sh") (string-append "-" (which "sh"))))
#t))
(add-before 'configure 'fix-smt-z3wrapper.ml
(lambda _
(substitute* "Makefile.in"
(("\\\\n") "")))))))
(("\\\\n") ""))
#t))
(add-before 'configure 'fix-ocaml-num
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "Makefile.in"
(("= \\$\\(FUNCTORYLIB\\)")
(string-append "= -I "
(assoc-ref inputs "ocaml-num")
"/lib/ocaml/site-lib"
" $(FUNCTORYLIB)")))
#t)))))
(home-page "http://cubicle.lri.fr/")
(synopsis "Model checker for array-based systems")
(description "Cubicle is a model checker for verifying safety properties

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,28 @@
From 26cac62fe0154cf65c06faaee10805531e9dade8 Mon Sep 17 00:00:00 2001
From bc3b353cb2f26cf10aa5c5caebddf6d3d5b1e318 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Wed, 14 Dec 2016 14:14:59 +0100
Date: Fri, 21 Sep 2018 22:31:29 +0200
Subject: [PATCH] fix camlp4 in another directory
---
Makefile | 11 ++++++-----
configure | 13 ++++++++++++-
myocamlbuild.ml | 2 +-
3 files changed, 19 insertions(+), 7 deletions(-)
Makefile | 11 ++++++-----
configure | 13 ++++++++++++-
tests/Makefile | 2 +-
tests/camlp4-comments/Makefile | 2 +-
tests/camlp4-exclude-file/Makefile | 2 +-
tests/camlp4-exclude/Makefile | 2 +-
tests/camlp4-instrument-fast/Makefile | 2 +-
tests/camlp4-instrument/Makefile | 2 +-
tests/combine-expr/Makefile | 2 +-
tests/ppx-comments/Makefile | 2 +-
tests/ppx-exclude-file/Makefile | 2 +-
tests/ppx-exclude/Makefile | 2 +-
tests/ppx-instrument-fast/Makefile | 2 +-
tests/ppx-instrument/Makefile | 2 +-
tests/report/Makefile | 2 +-
15 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index 4a8ce17..d94a6d5 100644
index b0980ee..6697922 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ PATH_BUILD=$(PATH_BASE)/_build
@ -19,12 +31,12 @@ index 4a8ce17..d94a6d5 100644
PATH_TESTS=$(PATH_BASE)/tests
-PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
+PATH_INSTALL=$(PREFIX)/lib/ocaml/bisect
# DEFINITIONS
@@ -33,7 +33,8 @@ PATH_INSTALL=$(PATH_OCAML_PREFIX)/lib/ocaml/bisect
PROJECT_NAME=bisect
OCAMLBUILD=$(PATH_OCAML_PREFIX)/bin/ocamlbuild
OCAMLBUILD=ocamlbuild
OCAMLBUILD_ENV=WARNINGS=$(WARNINGS) PATH_OCAML_PREFIX=$(PATH_OCAML_PREFIX)
-OCAMLBUILD_FLAGS=-classic-display -no-links
+CAMLP4_INCLUDE=$(shell test -z $(CAMLP4_LIBDIR) || echo "-cflags -I,$(CAMLP4_LIBDIR)")
@ -33,22 +45,22 @@ index 4a8ce17..d94a6d5 100644
MODULES_MLPACK=$(PROJECT_NAME).mlpack
MODULES_MLPACK_PP=$(PROJECT_NAME)_pp.mlpack
@@ -80,11 +81,11 @@ veryclean: clean
rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css
rm -f $(PATH_OCAMLDOC)/*.html $(PATH_OCAMLDOC)/*.css
install: FORCE
- cp $(PATH_BUILD)/src/report/report.byte $(PATH_OCAML_PREFIX)/bin/bisect-report; \
+ cp $(PATH_BUILD)/src/report/report.byte $(PREFIX)/bin/bisect-report; \
if [ "$(PPX)" = "TRUE" ]; then \
if [ "$(PPX)" = "TRUE" ]; then \
- cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PATH_OCAML_PREFIX)/bin; \
+ cp $(PATH_BUILD)/src/syntax/bisect_ppx.byte $(PREFIX)/bin; \
fi; \
- (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \
+ (test -x $(PATH_OCAML_PREFIX)/bin/ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \
if [ -x "$(PATH_OCAMLFIND)" ]; then \
$(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \
$(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \
fi; \
- (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PATH_OCAML_PREFIX)/bin/bisect-report.opt || true); \
+ (which ocamlopt && cp $(PATH_BUILD)/src/report/report.native $(PREFIX)/bin/bisect-report.opt || true); \
if [ -x "$(PATH_OCAMLFIND)" ]; then \
$(PATH_OCAMLFIND) query $(PROJECT_NAME) && $(PATH_OCAMLFIND) remove $(PROJECT_NAME) || true; \
$(PATH_OCAMLFIND) install $(PROJECT_NAME) META -optional \
diff --git a/configure b/configure
index bb7ebf4..61a3095 100755
index bb7ebf4..43ef46b 100755
--- a/configure
+++ b/configure
@@ -21,7 +21,9 @@
@ -79,47 +91,193 @@ index bb7ebf4..61a3095 100755
ppx='TRUE';;
*)
- echo "usage: $0 [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
+ echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
+ echo "usage: $0 [-prefix <path>] [-ocaml-prefix <path>] [-camlp4-prefix <path>] [-ocamlfind <path>] [-no-native-dynlink] [-devel]";
exit 1;;
esac
shift
@@ -57,6 +63,9 @@ if [ "$no_camlp4" = "TRUE" -a "$ppx" = "FALSE" ]; then
exit 1
fi
+# prefix default value
+test -z $prefix && prefix=$ocaml_prefix
+
# make options
make_quiet=`make -f - <<EOF
default: gnumake
@@ -67,11 +76,13 @@ EOF`
@@ -66,7 +75,9 @@ EOF`
# file creation
echo "# timestamp: `date`" > Makefile.config
+echo "PREFIX=$prefix" >> Makefile.config
echo "PATH_OCAML_PREFIX=$ocaml_prefix" >> Makefile.config
+echo "PATH_CAMLP4_PREFIX=$camlp4_prefix" >> Makefile.config
echo "PATH_OCAMLFIND=$ocamlfind" >> Makefile.config
echo "NATIVE_DYNLINK=$native_dynlink" >> Makefile.config
echo "WARNINGS=$devel" >> Makefile.config
echo "NO_CAMLP4=$no_camlp4" >> Makefile.config
echo "PPX=$ppx" >> Makefile.config
echo "MAKE_QUIET=$make_quiet" >> Makefile.config
+echo "PREFIX=$prefix" >> Makefile.config
echo "" >> Makefile.config
echo 'Makefile.config successfully created'
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index 8aa25fd..09a7d48 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -70,7 +70,7 @@ let () =
| After_rules ->
let camlp4of =
try
- let path_bin = Filename.concat (Sys.getenv "PATH_OCAML_PREFIX") "bin" in
+ let path_bin = Filename.concat (Sys.getenv "PATH_CAMLP4_PREFIX") "bin" in
Filename.concat path_bin "camlp4of"
with _ -> "camlp4of" in
flag ["ocaml"; "compile"; "pp_camlp4of"] (S[A"-pp"; A camlp4of]);
--
2.7.4
diff --git a/tests/Makefile b/tests/Makefile
index 1aba27f..9642323 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -41,7 +41,7 @@ one: FORCE
else \
echo "Running tests for '$(NAME)'..." | tee -a _log; \
(cd $(NAME) && \
- $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin \
+ $(MAKE) PATH_OCAML_BIN=$(PATH_OCAML_PREFIX)/bin PATH_CAMLP4_PREFIX=$(PATH_CAMLP4_PREFIX) \
COMPILER=ocamlc EXECUTABLE=bytecode RUN=./ LIB_EXT=cma EXE_SUFFIX='' \
REPORT=../../_build/src/report/report.byte && \
cd ..) || echo '*** error' >> _log; \
diff --git a/tests/camlp4-comments/Makefile b/tests/camlp4-comments/Makefile
index 33fca72..a918118 100644
--- a/tests/camlp4-comments/Makefile
+++ b/tests/camlp4-comments/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cmp
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cmp
diff --git a/tests/camlp4-exclude-file/Makefile b/tests/camlp4-exclude-file/Makefile
index ab13983..e2520fa 100644
--- a/tests/camlp4-exclude-file/Makefile
+++ b/tests/camlp4-exclude-file/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cmp
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude-file exclusions -o $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cmp
diff --git a/tests/camlp4-exclude/Makefile b/tests/camlp4-exclude/Makefile
index 18aada4..d71a7bc 100644
--- a/tests/camlp4-exclude/Makefile
+++ b/tests/camlp4-exclude/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cmp
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -exclude 'f.*' -o $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cmp
diff --git a/tests/camlp4-instrument-fast/Makefile b/tests/camlp4-instrument-fast/Makefile
index f60767f..8506e38 100644
--- a/tests/camlp4-instrument-fast/Makefile
+++ b/tests/camlp4-instrument-fast/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cmp
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo -mode fast $$file -o $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cmp
diff --git a/tests/camlp4-instrument/Makefile b/tests/camlp4-instrument/Makefile
index 33fca72..a918118 100644
--- a/tests/camlp4-instrument/Makefile
+++ b/tests/camlp4-instrument/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cmp
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/camlp4o$(EXE_SUFFIX) str.cma ../../_build/bisect_pp.cmo $$file -o $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cmp
diff --git a/tests/combine-expr/Makefile b/tests/combine-expr/Makefile
index 46ae9eb..e8e2af2 100644
--- a/tests/combine-expr/Makefile
+++ b/tests/combine-expr/Makefile
@@ -1,4 +1,4 @@
-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS)
+COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS)
default: clean compile run report
diff --git a/tests/ppx-comments/Makefile b/tests/ppx-comments/Makefile
index f8c645a..667526f 100644
--- a/tests/ppx-comments/Makefile
+++ b/tests/ppx-comments/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cm*
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cm*
diff --git a/tests/ppx-exclude-file/Makefile b/tests/ppx-exclude-file/Makefile
index a575a77..0dd1a20 100644
--- a/tests/ppx-exclude-file/Makefile
+++ b/tests/ppx-exclude-file/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cm*
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -exclude-file exclusions' -dsource $$file 2> $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cm*
diff --git a/tests/ppx-exclude/Makefile b/tests/ppx-exclude/Makefile
index a517af4..f502a42 100644
--- a/tests/ppx-exclude/Makefile
+++ b/tests/ppx-exclude/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cm*
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx "../../_build/src/syntax/bisect_ppx.byte -exclude 'f.*'" -dsource $$file 2> $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cm*
diff --git a/tests/ppx-instrument-fast/Makefile b/tests/ppx-instrument-fast/Makefile
index da78bb6..1195988 100644
--- a/tests/ppx-instrument-fast/Makefile
+++ b/tests/ppx-instrument-fast/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cm*
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte -mode fast' -dsource $$file 2> $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cm*
diff --git a/tests/ppx-instrument/Makefile b/tests/ppx-instrument/Makefile
index f8c645a..667526f 100644
--- a/tests/ppx-instrument/Makefile
+++ b/tests/ppx-instrument/Makefile
@@ -2,7 +2,7 @@ default:
@rm -fr *.result *.cm*
@for file in *.ml; do \
echo " testing '$$file' ..."; \
- $(PATH_OCAML_BIN)/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \
+ $(PATH_CAMLP4_PREFIX)/bin/ocamlc -c -I ../../_build -ppx '../../_build/src/syntax/bisect_ppx.byte' -dsource $$file 2> $$file.result; \
diff -q $$file.reference $$file.result || exit 1; \
done
@rm -fr *.result *.cm*
diff --git a/tests/report/Makefile b/tests/report/Makefile
index a7ffe44..a968bf9 100644
--- a/tests/report/Makefile
+++ b/tests/report/Makefile
@@ -1,4 +1,4 @@
-COMPILE_FLAGS=-I ../../_build -pp '$(PATH_OCAML_BIN)/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS)
+COMPILE_FLAGS=-I ../../_build -pp '$(PATH_CAMLP4_PREFIX)/bin/camlp4o str.cma -I ../../_build bisect_pp.cmo' bisect.$(LIB_EXT) $(FLAGS)
XMLLINT=$(shell which xmllint)
default: clean compile run report
--
2.18.0

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Ben Woodcroft <donttrustben@gmail.com>
;;;
;;; This file is part of GNU Guix.
@ -28,7 +28,9 @@
#:use-module (srfi srfi-1)
#:export (%ocaml-build-system-modules
package-with-ocaml4.01
package-with-ocaml4.02
strip-ocaml4.01-variant
strip-ocaml4.02-variant
ocaml-build
ocaml-build-system))
@ -82,6 +84,14 @@
(let ((module (resolve-interface '(gnu packages ocaml))))
(module-ref module 'ocaml4.01-findlib)))
(define (default-ocaml4.02)
(let ((ocaml (resolve-interface '(gnu packages ocaml))))
(module-ref ocaml 'ocaml-4.02)))
(define (default-ocaml4.02-findlib)
(let ((module (resolve-interface '(gnu packages ocaml))))
(module-ref module 'ocaml4.02-findlib)))
(define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix
#:key variant-property)
"Return a procedure of one argument, P. The procedure creates a package
@ -139,12 +149,24 @@ pre-defined variants."
"ocaml-" "ocaml4.01-"
#:variant-property 'ocaml4.01-variant))
(define package-with-ocaml4.02
(package-with-explicit-ocaml (delay (default-ocaml4.02))
(delay (default-ocaml4.02-findlib))
"ocaml-" "ocaml4.02-"
#:variant-property 'ocaml4.02-variant))
(define (strip-ocaml4.01-variant p)
"Remove the 'ocaml4.01-variant' property from P."
(package
(inherit p)
(properties (alist-delete 'ocaml4.01-variant (package-properties p)))))
(define (strip-ocaml4.02-variant p)
"Remove the 'ocaml4.02-variant' property from P."
(package
(inherit p)
(properties (alist-delete 'ocaml4.02-variant (package-properties p)))))
(define* (lower name
#:key source inputs native-inputs outputs system target
(ocaml (default-ocaml))