Skip to content

Commits on Source 11

S src
S bootstrap
B .
FLG -strict-sequence
FLG -safe-string
......@@ -2,9 +2,12 @@ language: c
os: linux
env:
- OCAML_VERSION=4.03.0
- OCAML_VERSION=4.04.0
- OCAML_VERSION=4.04.2
- OCAML_VERSION=4.05.0
- OCAML_VERSION=4.06.1
- OCAML_VERSION=4.07.0
install:
- echo "yes" | sudo add-apt-repository ppa:avsm/ocaml42+opam12
- echo "yes" | sudo add-apt-repository ppa:avsm/ppa
- sudo apt-get update -qq
- sudo apt-get install -qq opam
- export OPAMYES=1
......@@ -23,7 +26,7 @@ script:
- make distclean
- opam pin add -n -k path ocamlbuild .
- opam install -v ocamlbuild
- opam install -v mtime # this tests topkg, with stub libraries
- opam install -v inotify # this tests oasis, with stub libraries
- opam install -v cpuid # this tests the ocb-stubblr plugin
- opam install -v ppx_deriving # this tests the cppo plugin
- opam install -v mtime.1.0.0 # this tests topkg, with stub libraries
- opam install -v inotify.2.3 # this tests oasis, with stub libraries
- opam install -v cpuid.0.1.1 # this tests the ocb-stubblr plugin
- opam install -v shcaml.0.2.1 # this tests the cppo plugin
......@@ -11,6 +11,92 @@ We also use PR#$N for pull requests.
Changes breaking compatibility are marked with a "* " bullet instead
of the usual "- ".
0.14.0 (23 Feb 2019):
---------------------
Compared to the previous released version (0.12.0), OCamlbuild 0.14.0
contains new features (`ppopt(..)` and `ppxopt(...)` flags, ocamlbuild
options) and support for OCaml 4.08+dev.
* Revert the change to "pack" handling from the never-released 0.13
(#272), which turns out to break compatibility with too many
projects. At this point in the lifetime of ocamlbuild usage, it's
more important to keep building existing projects than to improve
the build system for new projects -- of course the latter is also
nice, but not when it endangers compatibility. (Gabriel Scherer)
0.13.1 (15 Sep 2018):
---------------------
This bugfix release attempts to fix a regression due to the change in
"pack" handling in 0.13.0. It is not clear whether the regression
should be considered a bug in 0.13.0 or an incorrect _tags file in the
broken package, but we prefer to fix it anyway.
- #287: change "linkpkg" flag definition to not apply in the
new "pack"++"link" mode introduced by #272. This avoids
a build failure in webidl.1.4 and possibly other packages
using "true: linkpkg".
(Gabriel Scherer, report by Andreas Hauptmann)
0.13.0 (8 Sep 2018):
--------------------
OCamlbuild 0.13.0 contains new features (`ppopt(..)` and `ppxopt(...)` flags,
ocamlbuild options) and bugfixes (to pack production, for 4.08+dev support).
- #45, #190: add ppopt(arg) and ppxopt(package,arg) when -use-ocamlfind
(Gabriel Scherer, review by whitequark,
request by Gabriel Scherer, Gabriel Radanne and Pavel Argentov)
- #268, #269: add flag support for some ocamlmklib options:
custom, debug, failsafe, linkall, ccopt(..), cclib(..), rpath(..), ldopt(..)
(Gabriel Scherer, report by Hannes Mehnert, review by whitequark)
* #272: add the "link" tag to "pack" actions
Instead of a separate category, "pack" is now another form of linking
like "program", "library", "toplevel" and "output_obj". This fixes
the issue that package(...) tags where not passed at pack-production
time, spotted by Jérémie Dimino. More generally, this extends
the meaning of all "link" flags to "pack", which seems to be the correct
behavior for all the rules we inspected.
(Gabriel Scherer, original issue diagnosis by Jérémie Dimino)
- #278: typo fixes in the manual
(Xinzhe Yang)
- #282: fix compilation with trunk OCaml (4.08+dev)
(Xavier Clerc and Nandor Licker)
0.12.0 (11 Nov 2017):
---------------------
OCamlbuild 0.12.0 is a maintenance release containing mostly bugfixes
and a few user-contributed features.
- #227: install signatures.{mli,cmi,cmti} to help documentation tools
(Daniel Bünzli and Gabriel Scherer)
- #232: fix Windows install rules
(David Allsopp)
- #234: add "afl_instrument" and "afl_inst_ratio" flags for corresponding
ocamlopt options.
(Jeremy Yallop)
- #237: extend cc/ccopt/cclib flags to apply to "ocaml" compilation as well,
as tweaking the C linker can be required for pure-OCaml projects -- see #236
(Gabriel Scherer, report by Nathan Rebours)
- #253: only run native tests if ocamlopt is available.
(Ximin Luo, review by whitequark and Gabriel Scherer)
- #256, #258: pass -keep-docs and -keep-locs when using -pack
(Gabriel Scherer, report by Vincent Jacques)
- #257, #259: add `_opam` to the list of directories ignored by default;
it is used for package-local opam switches
(Gabriel Scherer, request by Edwin Török)
0.11.0 (5 Mar 2017):
--------------------
......@@ -88,6 +174,14 @@ detailed changelog below for details.
- #202: install license, changes and readme in opam's docdir for `odig`
(Gabriel Scherer, request and review by Daniel Bünzli)
* #240: new heuristic for handling the OCAMLLIB environment variable.
`ocamlbuild -where` will ignore OCAMLLIB completely if OCAMLBUILD_LIBDIR is
not a lexical subdirectory of OCAML_LIBDIR (i.e. an opam installation).
Otherwise, it now returns $OCAMLLIB with the difference between
OCAMLBUILD_LIBDIR and OCAML_LIBDIR appended (i.e. for a normal findlib
installation, it now returns $OCAMLLIB/site-lib/ocamlbuild)
(David Allsopp, review by Gabriel Schere)
- "noautolink" tag for ocaml{c,opt}
(Gabriel Scherer)
......
# Specification for the "ocamlbuild" library
requires = "unix"
version = "0.11"
version = "0.14.0"
description = "ocamlbuild support library"
archive(byte) = "ocamlbuildlib.cma"
archive(native) = "ocamlbuildlib.cmxa"
......@@ -30,7 +30,7 @@ OCAMLLEX ?= ocamllex
endif
CP ?= cp
COMPFLAGS ?= -w L -w R -w Z -I src -I +unix -safe-string -bin-annot
COMPFLAGS ?= -w L -w R -w Z -I src -I +unix -safe-string -bin-annot -strict-sequence
LINKFLAGS ?= -I +unix -I src
PACK_CMO= $(addprefix src/,\
......@@ -105,6 +105,11 @@ INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR)
INSTALL_BINDIR=$(DESTDIR)$(BINDIR)
INSTALL_MANDIR=$(DESTDIR)$(MANDIR)
INSTALL_SIGNATURES=\
src/signatures.mli \
src/signatures.cmi \
src/signatures.cmti
ifeq ($(OCAML_NATIVE), true)
all: byte native man
else
......@@ -158,7 +163,7 @@ src/ocamlbuild_pack.cmx: $(PACK_CMX)
mkdir -p tmp
$(OCAMLOPT) -pack $^ -o tmp/ocamlbuild_pack.cmx
mv tmp/ocamlbuild_pack.cmx src/ocamlbuild_pack.cmx
mv tmp/ocamlbuild_pack.o src/ocamlbuild_pack.o
mv tmp/ocamlbuild_pack$(EXT_OBJ) src/ocamlbuild_pack$(EXT_OBJ)
# The lexers
......@@ -235,7 +240,7 @@ clean::
# The library is put in LIBDIR/ocamlbuild. We copy
# - the META file (for ocamlfind)
# - src/signatures.mli (user documentation)
# - src/signatures.{mli,cmi,cmti} (user documentation)
# - the files in INSTALL_LIB and INSTALL_LIB_OPT (if available)
# We support three installation methods:
......@@ -275,12 +280,14 @@ endif
install-lib-basics:
mkdir -p $(INSTALL_LIBDIR)/ocamlbuild
$(CP) META src/signatures.mli $(INSTALL_LIBDIR)/ocamlbuild
$(CP) META $(INSTALL_SIGNATURES) $(INSTALL_LIBDIR)/ocamlbuild
install-lib-basics-opam:
echo ' "opam"' >> ocamlbuild.install
echo ' "ocamlbuild.opam" {"opam"}' >> ocamlbuild.install
echo ' "META"' >> ocamlbuild.install
echo ' "src/signatures.mli" {"signatures.mli"}' >> ocamlbuild.install
for lib in $(INSTALL_SIGNATURES); do \
echo " \"$$lib\" {\"$$(basename $$lib)\"}" >> ocamlbuild.install; \
done
install-lib-byte:
mkdir -p $(INSTALL_LIBDIR)/ocamlbuild
......@@ -309,10 +316,10 @@ endif
install-lib-findlib:
ifeq ($(OCAML_NATIVE), true)
ocamlfind install ocamlbuild \
META src/signatures.mli $(INSTALL_LIB) $(INSTALL_LIB_OPT)
META $(INSTALL_SIGNATURES) $(INSTALL_LIB) $(INSTALL_LIB_OPT)
else
ocamlfind install ocamlbuild \
META src/signatures.mli $(INSTALL_LIB)
META $(INSTALL_SIGNATURES) $(INSTALL_LIB)
endif
install-lib-opam:
......@@ -336,7 +343,7 @@ install-man-opam:
echo >> ocamlbuild.install
install-doc-opam:
echo 'docdir: [' >> ocamlbuild.install
echo 'doc: [' >> ocamlbuild.install
echo ' "LICENSE"' >> ocamlbuild.install
echo ' "Changes"' >> ocamlbuild.install
echo ' "Readme.md"' >> ocamlbuild.install
......@@ -350,7 +357,10 @@ ifeq ($(OCAML_NATIVE), true)
endif
uninstall-lib-basics:
rm $(LIBDIR)/ocamlbuild/META $(LIBDIR)/ocamlbuild/signatures.mli
rm $(LIBDIR)/ocamlbuild/META
for lib in $(INSTALL_SIGNATURES); do \
rm $(LIBDIR)/ocamlbuild/`basename $$lib`;\
done
uninstall-lib-byte:
for lib in $(INSTALL_LIB); do\
......
0.11.0
\ No newline at end of file
0.14.0
\ No newline at end of file
......@@ -94,6 +94,10 @@ src/ocamlbuild_config.ml:
echo ;\
echo 'let bindir = "$(OCAMLBUILD_BINDIR)"'; \
echo 'let libdir = "$(OCAMLBUILD_LIBDIR)"'; \
echo 'let ocaml_libdir = "$(abspath $(OCAML_LIBDIR))"'; \
echo 'let libdir_abs = "$(abspath $(OCAMLBUILD_LIBDIR))"'; \
echo 'let ocaml_native = $(OCAML_NATIVE)'; \
echo 'let ocaml_native_tools = $(OCAML_NATIVE_TOOLS)'; \
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
echo 'let a = "$(A)"'; \
echo 'let o = "$(O)"'; \
......
ocamlbuild (0.11.0-4) UNRELEASED; urgency=medium
ocamlbuild (0.14.0-1) UNRELEASED; urgency=medium
* package description: remove strange characters, minor improvements of
[ Stéphane Glondu ]
* New upstream release
* Update Vcs-*
* Bump Standards-Version to 4.4.0
* Bump debhelper compat level to 12
[ Ralf Treinen ]
* Package description: remove strange characters, minor improvements of
wording (closes: #876000)
-- Ralf Treinen <treinen@debian.org> Sun, 17 Sep 2017 10:55:47 +0200
-- Stéphane Glondu <glondu@debian.org> Fri, 02 Aug 2019 11:53:35 +0200
ocamlbuild (0.11.0-3) unstable; urgency=medium
......
......@@ -3,11 +3,11 @@ Section: ocaml
Priority: optional
Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Uploaders: Ximin Luo <infinity0@debian.org>
Build-Depends: debhelper (>= 9), dh-ocaml,
Build-Depends: debhelper (>= 12), dh-ocaml,
ocaml-nox (>= 4.04.0),
ocaml-findlib (>= 1.7.3),
libfindlib-ocaml-dev (>= 1.7.3),
Standards-Version: 4.0.0
Standards-Version: 4.4.0
Homepage: https://github.com/ocaml/ocamlbuild/
Vcs-Git: https://salsa.debian.org/ocaml-team/ocamlbuild.git
Vcs-Browser: https://salsa.debian.org/ocaml-team/ocamlbuild
......
From: Stephane Glondu <steph@glondu.net>
Date: Fri, 2 Aug 2019 13:08:55 +0200
Subject: Disable tests failing with OCaml 4.08.0
---
testsuite/internal.ml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testsuite/internal.ml b/testsuite/internal.ml
index d3c2004..a87f5e2 100644
--- a/testsuite/internal.ml
+++ b/testsuite/internal.ml
@@ -200,7 +200,7 @@ let () =
"]
~targets:("src/foo.cmxs",[]) ();;
-let () = test "StrictSequenceFlag"
+let _ignored () = test "StrictSequenceFlag"
~options:[`no_ocamlfind; `quiet]
~description:"strict_sequence tag"
~tree:[T.f "hello.ml" ~content:"let () = 1; ()";
@@ -219,7 +219,7 @@ Command exited with code 2."
)
~targets:("hello.byte",[]) ();;
-let () = test "StrictFormatsFlag"
+let _ignored () = test "StrictFormatsFlag"
~options:[`no_ocamlfind; `quiet]
~description:"strict_format tag"
~tree:[T.f "hello.ml" ~content:"let _ = Printf.printf \"%.10s\"";
@@ -230,7 +230,7 @@ Error: invalid format \"%.10s\": at character number 0, \
Command exited with code 2."
~targets:("hello.byte",[]) ();;
-let () = test "PrincipalFlag"
+let _ignored () = test "PrincipalFlag"
~options:[`no_ocamlfind; `quiet]
~description:"-principal tag"
~tree:[T.f "hello.ml"
Description: Only run native tests if ocamlopt is available
Author: Ximin Luo <infinity0@pwned.gg>
Forwarded: https://github.com/ocaml/ocamlbuild/pull/253
--- a/testsuite/internal.ml
+++ b/testsuite/internal.ml
@@ -3,6 +3,7 @@
let () = test "BasicNativeTree"
~options:[`no_ocamlfind]
~description:"Output tree for native compilation"
+ ~requirements:ocamlopt_available
~tree:[T.f "dummy.ml"]
~matching:[M.Exact
(_build
@@ -37,6 +38,7 @@
let () = test "SeveralTargets"
~options:[`no_ocamlfind]
~description:"Several targets"
+ ~requirements:ocamlopt_available
~tree:[T.f "dummy.ml"]
~matching:[_build (M.lf ["dummy.byte"; "dummy.native"])]
~targets:("dummy.byte",["dummy.native"]) ();;
@@ -79,6 +81,7 @@
let () = test "PackAcross"
~options:[`no_ocamlfind]
~description:"Pack using a module from the other tree (PR#4592)"
+ ~requirements:ocamlopt_available
~tree:[T.f "main.ml" ~content:"let _ = Pack.Packed.g ()\n";
T.f "Pack.mlpack" ~content:"pack/Packed";
T.f "_tags" ~content:"<lib>: include\n<pack/*.cmx>: for-pack(Pack)\n";
@@ -118,6 +121,7 @@
`tags["native"]]
~description:"check that ocamlopt is used for .mli->.cmi \
when tag 'native' is set (part of PR#4613)"
+ ~requirements:ocamlopt_available
~tree:[T.f "foo.mli" ~content:"val bar : int"]
~matching:[_build [M.f "foo.cmi"]]
~targets:("foo.cmi",[]) ();;
@@ -157,12 +161,14 @@
let () = test "OutputObj"
~options:[`no_ocamlfind]
~description:"output_obj targets for native and bytecode (PR #6049)"
+ ~requirements:ocamlopt_available
~tree:[T.f "hello.ml" ~content:"print_endline \"Hello, World!\""]
~targets:("hello.byte.o",["hello.byte.c";"hello.native.o"]) ();;
let () = test "OutputShared"
~options:[`no_ocamlfind]
~description:"output_shared targets for native and bytecode (PR #6733)"
+ ~requirements:ocamlopt_available
~tree:[T.f "hello.ml" ~content:"print_endline \"Hello, World!\"";
T.f "_tags" ~content:"<*.so>: runtime_variant(_pic)"]
~targets:("hello.byte.so",["hello.native.so"]) ();;
@@ -170,6 +176,7 @@
let () = test "CmxsStubLink"
~options:[`no_ocamlfind]
~description:".cmxs link rules pass correct -I flags"
+ ~requirements:ocamlopt_available
~tree:[T.d "src" [
T.f "foo_stubs.c" ~content:"";
T.f "libfoo_stubs.clib" ~content:"foo_stubs.o";
@@ -236,6 +243,7 @@
let () = test "ModularPlugin2"
~description:"check that parametrized tags defined by the plugin \
do not warn at plugin-compilation time"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `quiet]
~tree:[T.f "main.ml" ~content:"let x = 1";
T.f "_tags" ~content:"<main.*>: toto(-g)";
@@ -249,6 +257,7 @@
let () = test "ModularPlugin3"
~description:"check that unknown parametrized tags encountered \
during plugin compilation still warn"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `quiet; `plugin_tag "toto(-g)"]
~tree:[T.f "main.ml" ~content:"let x = 1";
T.f "myocamlbuild.ml"
@@ -278,6 +287,7 @@
let () = test "PluginCompilation3"
~description:"check that the plugin is not executed \
when -just-plugin is passed"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `quiet; `just_plugin]
~tree:[T.f "main.ml" ~content:"let x = 1";
T.f "myocamlbuild.ml" ~content:"print_endline \"foo\";;"]
@@ -417,6 +427,7 @@
let () = test "CmxsFromMllib1"
~description:"Check that a .cmxs file can be built from a .mllib file"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `no_plugin]
~tree:[
T.f "a.ml" ~content:"let a = 1\n";
@@ -428,6 +439,7 @@
let () = test "CmxsFromMllib2"
~description:"Check that a .cmxs file can be built from a .mllib file,
even when one of the module has the same name as the library"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `no_plugin]
~tree:[
T.f "a.ml" ~content:"let a = 1\n";
@@ -441,6 +453,7 @@
let () = test "MldylibOverridesMllib"
~description:"Check that the rule producing a cmxs from a .mllib only \
triggers if there is no .mldylib"
+ ~requirements:ocamlopt_available
(*
GPR #132 (requested by issue #131) adds a new rule which allows producing a
.cmxs from a .mllib, where previously this was only possible by providing
@@ -460,6 +473,7 @@
let () = test "MldylibOverridesCmx"
~description:"Check that the rule producing foo.cmxs from foo.mldylib \
takes precedence over the one that uses foo.cmx"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `no_plugin]
~matching:[_build [M.f "bar.cmi"]]
~tree:[
@@ -472,6 +486,7 @@
let () = test "MllibOverridesCmx"
~description:"Check that the rule producing foo.cmxs from foo.mllib \
takes precedence over the one that uses foo.cmx"
+ ~requirements:ocamlopt_available
~options:[`no_ocamlfind; `no_plugin]
~matching:[_build [M.f "bar.cmi"]]
~tree:[
--- a/testsuite/internal_test_header.ml
+++ b/testsuite/internal_test_header.ml
@@ -1,8 +1,16 @@
#load "unix.cma";;
+#mod_use "../src/ocamlbuild_config.ml";;
+
#use "ocamlbuild_test.ml";;
module M = Match;;
module T = Tree;;
let _build = M.d "_build";;
+
+let ocamlopt_available =
+ if Ocamlbuild_config.ocaml_native then
+ Fullfilled
+ else
+ Missing ("ocamlopt")
--- a/configure.make
+++ b/configure.make
@@ -94,6 +94,8 @@
echo ;\
echo 'let bindir = "$(OCAMLBUILD_BINDIR)"'; \
echo 'let libdir = "$(OCAMLBUILD_LIBDIR)"'; \
+ echo 'let ocaml_native = $(OCAML_NATIVE)'; \
+ echo 'let ocaml_native_tools = $(OCAML_NATIVE_TOOLS)'; \
echo 'let supports_shared_libraries = $(SUPPORTS_SHARED_LIBRARIES)';\
echo 'let a = "$(A)"'; \
echo 'let o = "$(O)"'; \
condition-nativeonly-tests.patch
0001-Disable-tests-failing-with-OCaml-4.08.0.patch
*.byte
_build/
*.native
......@@ -4,6 +4,8 @@
# bin-annot is required for Merlin and other IDE-like tools
.PHONY: all clean byte native profile debug test
OCB_FLAGS = -tag bin_annot
OCB = ocamlbuild $(OCB_FLAGS)
......@@ -27,4 +29,3 @@ debug:
test: native
./main.native "OCaml" "OCamlBuild" "users"
.PHONY: all clean byte native profile debug test
#
# Pure OCaml, no packages, no _tags, code in serveral directories
# Pure OCaml, no packages, no _tags, code in several directories
#
# bin-annot is required for Merlin and other IDE-like tools
# The -I flag introduces sub-directories to search for code
.PHONY: all clean byte native profile debug test
OCB_FLAGS = -tag bin_annot -I src -I lib
OCB = ocamlbuild $(OCB_FLAGS)
......@@ -27,6 +29,3 @@ debug:
test: native
./main.native "OCaml" "OCamlBuild" "users"
.PHONY: all clean byte native profile debug test
......@@ -6,6 +6,8 @@
# - -use-ocamlfind is required to find packages (from Opam)
# - _tags file introduces packages, bin_annot flag for tool chain
.PHONY: all clean byte native profile debug sanity test
OCB_FLAGS = -use-ocamlfind -I src -I lib
OCB = ocamlbuild $(OCB_FLAGS)
......@@ -26,11 +28,9 @@ profile: sanity
debug: sanity
$(OCB) -tag debug main.byte
sanity:
# check that packages can be found
sanity:
ocamlfind query yojson
test: native
echo '[1, 2, "three", {"four": 4}]' | ./main.native
.PHONY: all clean byte native profile debug sanity test
......@@ -6,6 +6,8 @@
# - -use-ocamlfind is required to find packages (from Opam)
# - _tags file introduces packages, bin_annot
.PHONY: all clean byte native profile debug lib sanity test
OCB_FLAGS = -use-ocamlfind -I src -I libdemo
OCB = ocamlbuild $(OCB_FLAGS)
......@@ -36,5 +38,3 @@ sanity:
test: native
echo '{"hello": "json"}' | ./main.native
.PHONY: all clean byte native profile debug lib sanity test
......@@ -9,8 +9,9 @@
# - we are using menhir, the modern replacement for OCamlYacc
# OCB_FLAGS = -use-ocamlfind -I src -I lib # uses ocamlyacc
OCB_FLAGS = -use-ocamlfind -use-menhir -I src -I lib # uses menhir
.PHONY: all clean byte native profile debug sanity test
OCB_FLAGS = -use-ocamlfind -use-menhir -I src -I lib # uses menhir
OCB = ocamlbuild $(OCB_FLAGS)
all: native byte # profile debug
......@@ -30,11 +31,9 @@ profile: sanity
debug: sanity
$(OCB) -tag debug main.byte
sanity:
# check that menhir is installed, use "opam install menhir"
sanity:
which menhir
test: native
./main.native "2 + 3 * 3"
.PHONY: all clean byte native profile debug sanity test
......@@ -23,6 +23,6 @@ expr
| e1=expr PLUS e2=expr { e1 + e2 }
| e1=expr MINUS e2=expr { e1 - e2 }
| e1=expr TIMES e2=expr { e1 * e2 }
| e1=expr DIV e2=expr { e2 / e1 }
| e1=expr DIV e2=expr { e1 / e2 }
| MINUS e = expr %prec UMINUS { - e }
;