Hello community,
here is the log from the commit of package ocaml-ocamlbuild for
openSUSE:Factory checked in at 2019-10-07 13:40:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ocaml-ocamlbuild (Old)
and /work/SRC/openSUSE:Factory/.ocaml-ocamlbuild.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ocaml-ocamlbuild"
Mon Oct 7 13:40:42 2019 rev:3 rq:734136 version:0.14.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/ocaml-ocamlbuild/ocaml-ocamlbuild.changes
2017-08-18 15:03:35.385034140 +0200
+++
/work/SRC/openSUSE:Factory/.ocaml-ocamlbuild.new.2352/ocaml-ocamlbuild.changes
2019-10-07 13:40:44.564389698 +0200
@@ -1,0 +2,6 @@
+Mon Sep 23 16:35:39 UTC 2019 - [email protected]
+
+- Update to version 0.14.0, with _service
+ See included Changes for details
+
+-------------------------------------------------------------------
Old:
----
ocaml-ocamlbuild-0.11.0.tar.xz
New:
----
_service
ocaml-ocamlbuild-0.14.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ocaml-ocamlbuild.spec ++++++
--- /var/tmp/diff_new_pack.OJNy1s/_old 2019-10-07 13:40:45.932385915 +0200
+++ /var/tmp/diff_new_pack.OJNy1s/_new 2019-10-07 13:40:45.936385904 +0200
@@ -17,7 +17,7 @@
Name: ocaml-ocamlbuild
-Version: 0.11.0
+Version: 0.14.0
Release: 0
%{?ocaml_preserve_bytecode}
Summary: Generic build tool for building OCaml library and programs
@@ -49,7 +49,7 @@
developing applications that use %{name}.
%prep
-%setup -q -n ocamlbuild-%{version}
+%autosetup -p1
%build
tee %{name}.sh <<'_EOF_'
@@ -77,19 +77,18 @@
find %{buildroot} -ls
%files
-%defattr(-,root,root)
-%doc Changes LICENSE
+%doc Changes
+%license LICENSE
%{_bindir}/*
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%{_libdir}/ocaml/*/*.cma
%{_libdir}/ocaml/*/*.cmi
+%{_libdir}/ocaml/*/*.cmti
%{_libdir}/ocaml/*/*.cmo
%{_mandir}/man*/*
%files devel
-%defattr(-,root,root,-)
-%doc LICENSE
%dir %{_libdir}/ocaml
%dir %{_libdir}/ocaml/*
%if 0%{?ocaml_native_compiler}
++++++ _service ++++++
<services>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/ocaml/ocamlbuild.git</param>
<param name="scm">git</param>
<param name="versionformat">0.14.0</param>
<param name="revision">0.14.0</param>
<param name="filename">ocaml-ocamlbuild</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
</services>
++++++ ocaml-ocamlbuild-0.11.0.tar.xz -> ocaml-ocamlbuild-0.14.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/.gitignore
new/ocaml-ocamlbuild-0.14.0/.gitignore
--- old/ocamlbuild-0.11.0/.gitignore 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/.gitignore 1970-01-01 01:00:00.000000000
+0100
@@ -1,36 +0,0 @@
-# general patterns
-
-*.o
-*.a
-*.so
-*.obj
-*.lib
-*.dll
-*.cm[ioxat]
-*.cmx[as]
-*.cmti
-*.annot
-*.exe
-*.exe.manifest
-.depend
-.depend.nt
-.DS_Store
-*.out
-*.out.dSYM
-/tmp/
-
-ocamlbuild.install
-Makefile.config
-
-/bootstrap/src
-/bootstrap/_build*
-
-/src/ocamlbuild_config.ml
-/src/lexers.ml
-/src/glob_lexer.ml
-/ocamlbuild.byte
-/ocamlbuild.native
-
-/man/ocamlbuild.1
-/man/ocamlbuild.options.1
-/man/options_man.byte
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/.merlin
new/ocaml-ocamlbuild-0.14.0/.merlin
--- old/ocamlbuild-0.11.0/.merlin 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/.merlin 2019-02-23 15:46:00.000000000 +0100
@@ -1,3 +1,5 @@
S src
S bootstrap
B .
+FLG -strict-sequence
+FLG -safe-string
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/.travis.yml
new/ocaml-ocamlbuild-0.14.0/.travis.yml
--- old/ocamlbuild-0.11.0/.travis.yml 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/.travis.yml 2019-02-23 15:46:00.000000000
+0100
@@ -2,9 +2,12 @@
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 @@
- 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/Changes
new/ocaml-ocamlbuild-0.14.0/Changes
--- old/ocamlbuild-0.11.0/Changes 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/Changes 2019-02-23 15:46:00.000000000 +0100
@@ -11,6 +11,92 @@
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 @@
- #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)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/META
new/ocaml-ocamlbuild-0.14.0/META
--- old/ocamlbuild-0.11.0/META 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/META 2019-02-23 15:46:00.000000000 +0100
@@ -1,6 +1,6 @@
# 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"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/Makefile
new/ocaml-ocamlbuild-0.14.0/Makefile
--- old/ocamlbuild-0.11.0/Makefile 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/Makefile 2019-02-23 15:46:00.000000000
+0100
@@ -30,7 +30,7 @@
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_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 @@
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 @@
# 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 @@
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 @@
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 @@
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 @@
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\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/VERSION
new/ocaml-ocamlbuild-0.14.0/VERSION
--- old/ocamlbuild-0.11.0/VERSION 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/VERSION 2019-02-23 15:46:00.000000000 +0100
@@ -1 +1 @@
-0.11.0
\ No newline at end of file
+0.14.0
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/configure.make
new/ocaml-ocamlbuild-0.14.0/configure.make
--- old/ocamlbuild-0.11.0/configure.make 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/configure.make 2019-02-23 15:46:00.000000000
+0100
@@ -94,6 +94,10 @@
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)"'; \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/01-simple/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/01-simple/Makefile
--- old/ocamlbuild-0.11.0/examples/01-simple/Makefile 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/01-simple/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -4,27 +4,28 @@
# 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)
-all: native byte # profile debug
+all: native byte # profile debug
clean:
- $(OCB) -clean
+ $(OCB) -clean
native:
- $(OCB) main.native
+ $(OCB) main.native
byte:
- $(OCB) main.byte
+ $(OCB) main.byte
profile:
- $(OCB) -tag profile main.native
+ $(OCB) -tag profile main.native
debug:
- $(OCB) -tag debug main.byte
+ $(OCB) -tag debug main.byte
-test: native
- ./main.native "OCaml" "OCamlBuild" "users"
+test: native
+ ./main.native "OCaml" "OCamlBuild" "users"
-.PHONY: all clean byte native profile debug test
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/02-subdirs/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/02-subdirs/Makefile
--- old/ocamlbuild-0.11.0/examples/02-subdirs/Makefile 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/02-subdirs/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -1,32 +1,31 @@
#
-# 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)
+OCB = ocamlbuild $(OCB_FLAGS)
-all: native byte # profile debug
+all: native byte # profile debug
clean:
- $(OCB) -clean
+ $(OCB) -clean
native:
- $(OCB) main.native
+ $(OCB) main.native
byte:
- $(OCB) main.byte
+ $(OCB) main.byte
profile:
- $(OCB) -tag profile main.native
+ $(OCB) -tag profile main.native
debug:
- $(OCB) -tag debug main.byte
-
-test: native
- ./main.native "OCaml" "OCamlBuild" "users"
-
+ $(OCB) -tag debug main.byte
-.PHONY: all clean byte native profile debug test
+test: native
+ ./main.native "OCaml" "OCamlBuild" "users"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/03-packages/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/03-packages/Makefile
--- old/ocamlbuild-0.11.0/examples/03-packages/Makefile 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/03-packages/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -6,31 +6,31 @@
# - -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)
+OCB = ocamlbuild $(OCB_FLAGS)
-all: native byte # profile debug
+all: native byte # profile debug
clean:
- $(OCB) -clean
+ $(OCB) -clean
-native: sanity
- $(OCB) main.native
+native: sanity
+ $(OCB) main.native
-byte: sanity
- $(OCB) main.byte
+byte: sanity
+ $(OCB) main.byte
-profile: sanity
- $(OCB) -tag profile main.native
+profile: sanity
+ $(OCB) -tag profile main.native
-debug: sanity
- $(OCB) -tag debug main.byte
+debug: sanity
+ $(OCB) -tag debug main.byte
+# check that packages can be found
sanity:
- # check that packages can be found
- ocamlfind query yojson
-
-test: native
- echo '[1, 2, "three", {"four": 4}]' | ./main.native
+ ocamlfind query yojson
-.PHONY: all clean byte native profile debug sanity test
+test: native
+ echo '[1, 2, "three", {"four": 4}]' | ./main.native
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/04-library/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/04-library/Makefile
--- old/ocamlbuild-0.11.0/examples/04-library/Makefile 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/04-library/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -6,35 +6,35 @@
# - -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)
+OCB = ocamlbuild $(OCB_FLAGS)
-all: native byte lib # profile debug
+all: native byte lib # profile debug
clean:
- $(OCB) -clean
+ $(OCB) -clean
lib:
- $(OCB) libdemo.cma
- $(OCB) libdemo.cmxa
- $(OCB) libdemo.cmxs
+ $(OCB) libdemo.cma
+ $(OCB) libdemo.cmxa
+ $(OCB) libdemo.cmxs
-native: sanity
- $(OCB) main.native
+native: sanity
+ $(OCB) main.native
-byte: sanity
- $(OCB) main.byte
+byte: sanity
+ $(OCB) main.byte
-profile: sanity
- $(OCB) -tag profile main.native
+profile: sanity
+ $(OCB) -tag profile main.native
-debug: sanity
- $(OCB) -tag debug main.byte
+debug: sanity
+ $(OCB) -tag debug main.byte
sanity:
- ocamlfind query yojson
+ ocamlfind query yojson
-test: native
- echo '{"hello": "json"}' | ./main.native
-
-.PHONY: all clean byte native profile debug lib sanity test
+test: native
+ echo '{"hello": "json"}' | ./main.native
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/05-lex-yacc/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/05-lex-yacc/Makefile
--- old/ocamlbuild-0.11.0/examples/05-lex-yacc/Makefile 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/05-lex-yacc/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -9,32 +9,31 @@
# - 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 = ocamlbuild $(OCB_FLAGS)
+OCB_FLAGS = -use-ocamlfind -use-menhir -I src -I lib # uses menhir
+OCB = ocamlbuild $(OCB_FLAGS)
-all: native byte # profile debug
+all: native byte # profile debug
clean:
- $(OCB) -clean
+ $(OCB) -clean
-native: sanity
- $(OCB) main.native
+native: sanity
+ $(OCB) main.native
-byte: sanity
- $(OCB) main.byte
+byte: sanity
+ $(OCB) main.byte
-profile: sanity
- $(OCB) -tag profile main.native
+profile: sanity
+ $(OCB) -tag profile main.native
-debug: sanity
- $(OCB) -tag debug main.byte
+debug: sanity
+ $(OCB) -tag debug main.byte
+# check that menhir is installed, use "opam install menhir"
sanity:
- # check that menhir is installed, use "opam install
menhir"
- which menhir
+ which menhir
-test: native
- ./main.native "2 + 3 * 3"
-
-.PHONY: all clean byte native profile debug sanity test
+test: native
+ ./main.native "2 + 3 * 3"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ocamlbuild-0.11.0/examples/05-lex-yacc/src/parser.mly
new/ocaml-ocamlbuild-0.14.0/examples/05-lex-yacc/src/parser.mly
--- old/ocamlbuild-0.11.0/examples/05-lex-yacc/src/parser.mly 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/05-lex-yacc/src/parser.mly
2019-02-23 15:46:00.000000000 +0100
@@ -23,6 +23,6 @@
| 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 }
;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/06-ocamldoc/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/06-ocamldoc/Makefile
--- old/ocamlbuild-0.11.0/examples/06-ocamldoc/Makefile 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/06-ocamldoc/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -1,5 +1,5 @@
#
-# Pure OCaml, no packages, no _tags, code in serveral directories
+# Pure OCaml, no packages, no _tags, code in several directories
# Targets starting with "doc_" generate documentation for the Util and Hello
# modules
#
@@ -7,47 +7,46 @@
# 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)
+OCB = ocamlbuild $(OCB_FLAGS)
-all: native byte # profile debug
+all: native byte # profile debug
clean:
- $(OCB) -clean
+ $(OCB) -clean
native:
- $(OCB) main.native
+ $(OCB) main.native
byte:
- $(OCB) main.byte
+ $(OCB) main.byte
profile:
- $(OCB) -tag profile main.native
+ $(OCB) -tag profile main.native
debug:
- $(OCB) -tag debug main.byte
+ $(OCB) -tag debug main.byte
doc_html:
- $(OCB) doc/api.docdir/index.html
+ $(OCB) doc/api.docdir/index.html
doc_man:
- $(OCB) doc/api.docdir/man
+ $(OCB) doc/api.docdir/man
-doc_tex:
# the name of the .tex file can be anything
- $(OCB) doc/api.docdir/api.tex
+doc_tex:
+ $(OCB) doc/api.docdir/api.tex
-doc_texinfo:
# the name of the .texi file can be anything
- $(OCB) doc/api.docdir/api.texi
+doc_texinfo:
+ $(OCB) doc/api.docdir/api.texi
-doc_dot:
# the .dot graph represents inter-module dependencies
# as before, the name doesn't matter
- $(OCB) doc/api.docdir/api.dot
-
-test: native
- ./main.native "OCaml" "OCamlBuild" "users"
-
+doc_dot:
+ $(OCB) doc/api.docdir/api.dot
-.PHONY: all clean byte native profile debug test
+test: native
+ ./main.native "OCaml" "OCamlBuild" "users"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ocamlbuild-0.11.0/examples/07-dependent-projects/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/07-dependent-projects/Makefile
--- old/ocamlbuild-0.11.0/examples/07-dependent-projects/Makefile
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/07-dependent-projects/Makefile
2019-02-23 15:46:00.000000000 +0100
@@ -0,0 +1,33 @@
+#
+# Pure OCaml, project depends on library code from a local project
+#
+# For more details, see:
+#
https://ocaml.org/learn/tutorials/ocamlbuild/Working_on_dependent_projects_with_ocamlbuild.html
+#
+
+# - The -I flag introduces sub-directories
+
+.PHONY: all clean byte native profile debug test
+
+OCB_FLAGS = -I src -I libdemo
+OCB = ocamlbuild $(OCB_FLAGS)
+
+all: native byte
+
+clean:
+ $(OCB) -clean
+
+native:
+ $(OCB) main.native
+
+byte:
+ $(OCB) main.byte
+
+profile:
+ $(OCB) -tag profile main.native
+
+debug:
+ $(OCB) -tag debug main.byte
+
+test: native
+ ./main.native groucho harpo chico
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ocamlbuild-0.11.0/examples/07-dependent-projects/libdemo
new/ocaml-ocamlbuild-0.14.0/examples/07-dependent-projects/libdemo
--- old/ocamlbuild-0.11.0/examples/07-dependent-projects/libdemo
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/07-dependent-projects/libdemo
2019-10-07 13:40:46.068385539 +0200
@@ -0,0 +1 @@
+symbolic link to ../04-library/libdemo
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/ocamlbuild-0.11.0/examples/07-dependent-projects/src/main.ml
new/ocaml-ocamlbuild-0.14.0/examples/07-dependent-projects/src/main.ml
--- old/ocamlbuild-0.11.0/examples/07-dependent-projects/src/main.ml
1970-01-01 01:00:00.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/07-dependent-projects/src/main.ml
2019-02-23 15:46:00.000000000 +0100
@@ -0,0 +1,9 @@
+let main () =
+ let argv = Array.to_list Sys.argv in
+ let args = List.tl argv in
+ let this = List.hd argv in
+ match args with
+ | [] -> Printf.eprintf "usage: %s [WORD]..." this; exit 1
+ | _ -> Printf.eprintf "%s\n" (Util.join args)
+
+let () = main ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/examples/Makefile
new/ocaml-ocamlbuild-0.14.0/examples/Makefile
--- old/ocamlbuild-0.11.0/examples/Makefile 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/examples/Makefile 2019-02-23
15:46:00.000000000 +0100
@@ -1,15 +1,10 @@
-#
-#
-#
-
+.PHONY: all test clean
all:
- for d in [0-9]*-*; do $(MAKE) -C $$d all; done
+ for d in [0-9]*-*; do $(MAKE) -C $$d all; done
test:
- for d in [0-9]*-*; do $(MAKE) -C $$d test; done
+ for d in [0-9]*-*; do $(MAKE) -C $$d test; done
clean:
- for d in [0-9]*-*; do $(MAKE) -C $$d clean; done
-
-
+ for d in [0-9]*-*; do $(MAKE) -C $$d clean; done
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/howto/release.adoc
new/ocaml-ocamlbuild-0.14.0/howto/release.adoc
--- old/ocamlbuild-0.11.0/howto/release.adoc 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/howto/release.adoc 2019-02-23
15:46:00.000000000 +0100
@@ -147,11 +147,6 @@
This command should start an editor to ask for a tag message. You can
use the <<change-summary,release change summary>> as the tag message.
-----
-git push
-git push --tags
-----
-
==== Post-release changes ====
Create an empty Changes section for the next release,
@@ -166,6 +161,13 @@
== Making the release visible to our users ==
+=== push it upstream ===
+----
+git push
+git push --tags
+----
+
+
[[opam-repo]]
=== opam-repository update ===
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/manual/manual.adoc
new/ocaml-ocamlbuild-0.14.0/manual/manual.adoc
--- old/ocamlbuild-0.11.0/manual/manual.adoc 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/manual/manual.adoc 2019-02-23
15:46:00.000000000 +0100
@@ -91,6 +91,10 @@
| link:../examples/06-ocamldoc[06-ocamldoc]
| A simple example illustrating the use of OCamldoc to generate documentation
as html, TeX, man-pages and graphviz files. See <<Sec_Archives_documentation>>
for more details.
+
+| link:../examples/07-dependent-projects[07-dependent-projects]
+| A simple example demonstrating the use of symbolic links to include library
code from another local project.
+ See
https://ocaml.org/learn/tutorials/ocamlbuild/Working_on_dependent_projects_with_ocamlbuild.html[here]
for more details.
|===
NOTE: There are many ways to integrate OCamlbuild in your project.
@@ -305,6 +309,8 @@
If you use `-ppx` preprocessors, you can use the parametrized tag `ppx(...)`
(`-tag "ppx(...)"`) to specify the preprocessor to use.
+Since ocamlbuild NEXT_RELASE, the tags `ppopt(option)` and
`ppxopt(package,option)` are also supported -- if you have set `-use-ocamlfind`.
+
// TODO: Improve title.
[[Sec_Archives_documentation]]
=== Archives, documentation
@@ -360,7 +366,7 @@
"foo/baz": -traverse
----
-If the option `-r` (for _recursive_) is passed, then all subdirectories
(recursively) are considered part of the source directories by default, except
the build directory and directories that look like version-control information
(`.svn`, `.bzr`, `.hg`, `.git`, `_darcs`).
+If the option `-r` (for _recursive_) is passed, then all subdirectories
(recursively) are considered part of the source directories by default, except
the build directory and directories that look like version-control information
(`.svn`, `.bzr`, `.hg`, `.git`, `_darcs`) and `_opam`, used for project-local
opam switches.
This option is enabled by default _if_ the root directory looks like an
OCamlbuild project: either a `myocamlbuild.ml` or a `_tags` file is present.
@@ -535,7 +541,7 @@
| `.docdir/man`
| As `.docdir/index.html` above, but builds the documentation in `man` format.
-| `.docdir/bar.tex` or `.docdic/bar.ltx`
+| `.docdir/bar.tex` or `.docdir/bar.ltx`
| Building the target `foo.docdir/bar.tex` will build the documentation for
the modules listed in `foo.odocl`, as a LaTeX file named `foo.docdir/bar.tex`.
The basename `bar` is not important, but it is the extension `.tex` or `.ltx`
that indicates to OCamlbuild that ocamldoc should be asked for a LaTeX output.
@@ -700,7 +706,7 @@
* `no_alias_deps`
* `no_float_const_prop`
* `noassert`
-* `noautolink` (since NEXT_RELEASE)
+* `noautolink` (since 0.11.0)
* `nolabels`
* `nopervasives`
* `nostdlib` (since 0.9.4)
@@ -745,6 +751,11 @@
* `no_unbox_free_vars_of_closures`
* `no_unbox_specialized_args`
+===== Compiler tags for the AFL instrumentation mode (4.05 and newer)
+
+* `afl_instrument` (since 0.12.0)
+* `afl_inst_ratio` (since 0.12.0)
+
===== `ocamlfind` tags
* `package(pkgname)`
@@ -752,6 +763,8 @@
* `dontlink(pkgname)`
* `predicate(foo)`
* `syntax(bar)`
+* `ppopt(camlp4-option)` (since 0.13.0)
+* `ppxopt(package,option)` (since 0.13.0)
===== `ocamllex` tags
@@ -793,6 +806,7 @@
If you wished to use OCamlbuild for a completely different purpose (not
necessarily OCaml-related), for example building LaTeX documents, you could use
a corresponding `latex` tag.
* compilation stage context: `pp` (syntactic preprocessing), `compile`
(compilation of source files), `link` (linking of object files), but also
`pack` (when packing compiled object files), `library` (when creating library
archives), `infer_interface` (producing a `.mli` from the corresponding `.ml`)
and `toplevel` (when building custom toplevels).
* byte or native compilation context: `byte` (`ocamlc`) or `native`
(`ocamlopt`).
+* File tags: when building the target `foo.bar`, a tag `file:foo.bar` is added
to the set of current tags. This can be used for one-off customizations.
* extension tags: when building the target `foo.bar`, a tag `extension:bar` is
added to the set of current tags.
This is used by the builtin `ocamldoc` rules to enable either `-latex` or
`-dot` depending on the requested target extension.
* tool-specific tags: `menhir`, `ocamlyacc`, `ocamllex`, `doc` (for `ocamldoc`)
@@ -1048,7 +1062,7 @@
You can influence the `myocamlbuild.ml` compilation-and-launch process in
several ways:
-* The `no-plugin` option allows to ignore the `myocamlbuild.ml` file and just
run the stock `ocamlbuild` executable on your project.
+* The `-no-plugin` option allows to ignore the `myocamlbuild.ml` file and just
run the stock `ocamlbuild` executable on your project.
This means that fancy new rules introduced by `myocamlbuild.ml` will not be
available.
* The `-just-plugin` option instructs OCamlbuild to stop compilation after
having built the plugin.
It also guarantees that OCamlbuild will try to compile the plugin, which it
may not always do, for example when you only ask for cleaning or documentation.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/ocamlbuild.opam
new/ocaml-ocamlbuild-0.14.0/ocamlbuild.opam
--- old/ocamlbuild-0.11.0/ocamlbuild.opam 1970-01-01 01:00:00.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/ocamlbuild.opam 2019-02-23 15:46:00.000000000
+0100
@@ -0,0 +1,35 @@
+opam-version: "2.0"
+maintainer: "Gabriel Scherer <[email protected]>"
+authors: ["Nicolas Pouillard" "Berke Durak"]
+homepage: "https://github.com/ocaml/ocamlbuild/"
+bug-reports: "https://github.com/ocaml/ocamlbuild/issues"
+license: "LGPL-2 with OCaml linking exception"
+doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc"
+dev-repo: "git+https://github.com/ocaml/ocamlbuild.git"
+synopsis:
+ "OCamlbuild is a build system with builtin rules to easily build most OCaml
projects."
+
+build: [
+ [
+ make
+ "-f"
+ "configure.make"
+ "all"
+ "OCAMLBUILD_PREFIX=%{prefix}%"
+ "OCAMLBUILD_BINDIR=%{bin}%"
+ "OCAMLBUILD_LIBDIR=%{lib}%"
+ "OCAMLBUILD_MANDIR=%{man}%"
+ "OCAML_NATIVE=%{ocaml:native}%"
+ "OCAML_NATIVE_TOOLS=%{ocaml:native}%"
+ ]
+ [make "check-if-preinstalled" "all" "opam-install"]
+]
+
+conflicts: [
+ "base-ocamlbuild"
+ "ocamlfind" {< "1.6.2"}
+]
+
+depends: [
+ "ocaml" {>= "4.03"}
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/opam
new/ocaml-ocamlbuild-0.14.0/opam
--- old/ocamlbuild-0.11.0/opam 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/opam 1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-opam-version: "1.2"
-name: "ocamlbuild"
-maintainer: "Gabriel Scherer <[email protected]>"
-version: "dev"
-
-authors: [
- "Nicolas Pouillard"
- "Berke Durak"
-]
-
-license: "LGPL-2 with OCaml linking exception"
-dev-repo: "https://github.com/ocaml/ocamlbuild.git"
-homepage: "https://github.com/ocaml/ocamlbuild/"
-bug-reports: "https://github.com/ocaml/ocamlbuild/issues"
-doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc"
-
-build: [
- [make "-f" "configure.make" "all"
- "OCAMLBUILD_PREFIX=%{prefix}%"
- "OCAMLBUILD_BINDIR=%{bin}%"
- "OCAMLBUILD_LIBDIR=%{lib}%"
- "OCAMLBUILD_MANDIR=%{man}%"
- "OCAML_NATIVE=%{ocaml-native}%"
- "OCAML_NATIVE_TOOLS=%{ocaml-native}%"]
- [make "check-if-preinstalled" "all" "opam-install"]
-]
-
-available: [ocaml-version >= "4.03"]
-depends: [ ]
-conflicts: [
- "base-ocamlbuild"
- "ocamlfind" {< "1.6.2"}
-]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/src/main.ml
new/ocaml-ocamlbuild-0.14.0/src/main.ml
--- old/ocamlbuild-0.11.0/src/main.ml 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/src/main.ml 2019-02-23 15:46:00.000000000
+0100
@@ -19,7 +19,6 @@
open Command
open Tools
open Ocaml_specific
-open Format
;;
exception Exit_build_error of string
@@ -96,7 +95,7 @@
<**/*.cmi>: ocaml, byte, native
<**/*.cmx>: ocaml, native
<**/*.mly>: infer
-<**/.svn>|"CVS"|".bzr"|".hg"|".git"|"_darcs"|"node_modules": -traverse
+<**/.svn>|"CVS"|".bzr"|".hg"|".git"|"_darcs"|"_opam"|"node_modules": -traverse
|};
List.iter
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/src/ocaml_specific.ml
new/ocaml-ocamlbuild-0.14.0/src/ocaml_specific.ml
--- old/ocamlbuild-0.11.0/src/ocaml_specific.ml 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/src/ocaml_specific.ml 2019-02-23
15:46:00.000000000 +0100
@@ -676,7 +676,7 @@
useful to pass -linkpkg when building archives for example
(.cma and .cmxa); the "linkpkg" flag allows user to request it
explicitly. *)
- flag ["ocaml"; "link"; "linkpkg"] & A"-linkpkg";
+ flag ["ocaml"; "link"; "library"; "linkpkg"] & A"-linkpkg";
pflag ["ocaml"; "link"] "dontlink" ~doc_param
(fun pkg -> S[A"-dontlink"; A pkg]);
@@ -693,13 +693,19 @@
["c"; "compile"];
] in
- (* tags package(X), predicate(X) and syntax(X) *)
+ (* tags package(X), predicate(X) and syntax(X), ppopt(X), ppxopt(X) *)
List.iter begin fun tags ->
pflag tags "package" ~doc_param (fun pkg -> S [A "-package"; A pkg]);
pflag tags "predicate" ~doc_param:"archive"
(fun pkg -> S [A "-predicates"; A pkg]);
- if List.mem "ocaml" tags then
- pflag tags "syntax" ~doc_param:"camlp4o" (fun pkg -> S [A "-syntax"; A
pkg])
+ if List.mem "ocaml" tags then begin
+ pflag tags "syntax" ~doc_param:"camlp4o"
+ (fun pkg -> S [A "-syntax"; A pkg]);
+ pflag tags "ppopt" ~doc_param:"pparg"
+ (fun arg -> S [A "-ppopt"; A arg]);
+ pflag tags "ppxopt" ~doc_param:"package,arg"
+ (fun arg -> S [A "-ppxopt"; A arg]);
+ end;
end all_tags
end else begin
try
@@ -788,6 +794,8 @@
(fun param -> S [A "-inline-max-unroll"; A param]);
pflag ["ocaml"; "native"; "compile"] "unbox_closures_factor" ~doc_param:"10"
(fun param -> S [A "-unbox-closures-factor"; A param]);
+ pflag ["ocaml"; "native"; "compile"] "afl_inst_ratio" ~doc_param:"50"
+ (fun param -> S [A "-afl-inst-ratio"; A param]);
()
let camlp4_flags camlp4s =
@@ -876,6 +884,11 @@
flag ["ocaml"; "link"; "toplevel"; "custom"; "byte"] (A "-custom");;
flag ["ocaml"; "compile"; "profile"; "native"] (A "-p");;
+flag ["ocamlmklib"; "linkall"] (A "-linkall");;
+flag ["ocamlmklib"; "custom"] (A "-custom");;
+flag ["ocamlmklib"; "failsafe"] (A "-failsafe");;
+flag ["ocamlmklib"; "debug"] (A "-g");;
+
flag ["ocaml"; "compile"; "no_alias_deps";] (A "-no-alias-deps");;
flag ["ocaml"; "infer_interface"; "no_alias_deps";] (A "-no-alias-deps");;
@@ -899,14 +912,20 @@
end;;
flag ["ocaml"; "native"; "compile"; "no_float_const_prop";] (A
"-no-float-const-prop");
-flag ["ocaml"; "compile"; "keep_docs";] (A "-keep-docs");
-flag ["ocaml"; "infer_interface"; "keep_docs";] (A "-keep-docs");
-flag ["ocaml"; "compile"; "keep_locs";] (A "-keep-locs");
-flag ["ocaml"; "absname"; "compile"] (A "-absname");;
-flag ["ocaml"; "absname"; "infer_interface"] (A "-absname");;
+
+["compile"; "link"; "pack"] |> List.iter begin fun phase ->
+ flag ["ocaml"; phase; "keep_docs";] (A "-keep-docs");
+ flag ["ocaml"; phase; "keep_locs";] (A "-keep-locs");
+end;;
+["compile"; "infer_interface"] |> List.iter begin fun phase ->
+ flag ["ocaml"; phase; "absname"] (A "-absname");
+end;;
+
flag ["ocaml"; "byte"; "compile"; "compat_32";] (A "-compat-32");;
flag ["ocaml";"compile";"native";"asm"] & S [A "-S"];;
+(* AFL instrumentation *)
+flag ["ocaml"; "compile"; "native"; "afl_instrument"] (A "-afl-instrument");;
(* threads, with or without findlib *)
flag ["ocaml"; "compile"; "thread"] (A "-thread");;
@@ -996,13 +1015,24 @@
ocaml_lib "ocamlbuildlib";;
ocaml_lib "ocamlbuildlightlib";;
-pflag ["c"; "compile"] "cc" (fun param -> S [A "-cc"; A param]);;
-pflag ["c"; "link"] "cc" (fun param -> S [A "-cc"; A param]);;
-
-pflag ["c"; "compile"] "ccopt" (fun param -> S [A "-ccopt"; A param]);;
-pflag ["c"; "link"] "ccopt" (fun param -> S [A "-ccopt"; A param]);;
+begin
+ let ccflag ~lang ~phase ~flag =
+ pflag [lang; phase] flag (fun param -> S [A ("-"^flag); A param])
+ in
+ ["c"; "ocaml"] |> List.iter (fun lang ->
+ ["compile"; "link"] |> List.iter (fun phase ->
+ ["cc"; "ccopt"; "cclib"] |> List.iter (fun flag ->
+ ccflag ~lang ~phase ~flag)))
+end;;
-pflag ["c"; "compile"] "cclib" (fun param -> S [A "-cclib"; A param]);;
-pflag ["c"; "link"] "cclib" (fun param -> S [A "-cclib"; A param]);;
+begin
+ let ocamlmklib_pflag ?doc_param flag =
+ pflag ["ocamlmklib"] flag ?doc_param
+ (fun param -> S [A ("-"^flag); A param]) in
+ ocamlmklib_pflag "cclib";
+ ocamlmklib_pflag "ccopt";
+ ocamlmklib_pflag "rpath";
+ ocamlmklib_pflag "ldopt";
+end;;
end in ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/src/ocamlbuild_where.ml
new/ocaml-ocamlbuild-0.14.0/src/ocamlbuild_where.ml
--- old/ocamlbuild-0.11.0/src/ocamlbuild_where.ml 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/src/ocamlbuild_where.ml 2019-02-23
15:46:00.000000000 +0100
@@ -11,10 +11,40 @@
(* *)
(***********************************************************************)
-let bindir = ref Ocamlbuild_config.bindir;;
+module O = Ocamlbuild_config;;
+
+let bindir = ref O.bindir;;
let libdir = ref begin
- Filename.concat
- (try Sys.getenv "OCAMLLIB"
- with Not_found -> Ocamlbuild_config.libdir)
- "ocamlbuild"
+ let root, suffix =
+ let ocaml_lib_len = String.length O.ocaml_libdir + 1 in
+ let lib_len = String.length O.libdir_abs in
+ (* Windows note: O.ocaml_libdir and O.libdir_abs have both been passed
+ through GNU make's abspath function and will be forward-slash
normalised.
+ Filename.dir_sep is therefore not appropriate here. *)
+ if lib_len < ocaml_lib_len
+ || String.sub O.libdir_abs 0 ocaml_lib_len <> O.ocaml_libdir ^ "/" then
+ O.libdir, "ocamlbuild"
+ else
+ (* https://github.com/ocaml/ocamlbuild/issues/69. Only use OCAMLLIB if
+ the configured LIBDIR is a subdirectory (lexically) of OCAML_LIBDIR.
+ If it is, append the difference between LIBDIR and OCAML_LIBDIR to
+ OCAMLLIB. This allows `OCAMLLIB=/foo ocamlbuild -where` to return
+ /foo/site-lib/ocamlbuild for a findlib-based installation and also
+ to ignore OCAMLLIB in an opam-based installation (where setting
+ OCAMLLIB is already a strange thing to have done). *)
+ try
+ let normalise_slashes =
+ if Sys.os_type = "Win32" then
+ String.map (function '/' -> '\\' | c -> c)
+ else
+ function s -> s
+ in
+ let subroot =
+ String.sub O.libdir_abs ocaml_lib_len (lib_len - ocaml_lib_len)
+ |> normalise_slashes
+ in
+ Sys.getenv "OCAMLLIB", Filename.concat subroot "ocamlbuild"
+ with Not_found -> O.libdir, "ocamlbuild"
+ in
+ Filename.concat root suffix
end;;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/src/options.ml
new/ocaml-ocamlbuild-0.14.0/src/options.ml
--- old/ocamlbuild-0.11.0/src/options.ml 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/src/options.ml 2019-02-23 15:46:00.000000000
+0100
@@ -136,6 +136,7 @@
let my_include_dirs = ref [[Filename.current_dir_name]]
let my_exclude_dirs = ref [
[".svn"; "CVS"; ".bzr"; ".hg"; ".git"; "_darcs";
+ "_opam";
"node_modules"]
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/src/signatures.mli
new/ocaml-ocamlbuild-0.14.0/src/signatures.mli
--- old/ocamlbuild-0.11.0/src/signatures.mli 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/src/signatures.mli 2019-02-23
15:46:00.000000000 +0100
@@ -32,7 +32,7 @@
module type LIST = sig
(* Added functions *)
- val print : (Format.formatter -> 'a -> 'b) -> Format.formatter -> 'a list ->
unit
+ val print : (Format.formatter -> 'a -> unit) -> Format.formatter -> 'a list
-> unit
val filter_opt : ('a -> 'b option) -> 'a list -> 'b list
val union : 'a list -> 'a list -> 'a list
val ordered_unique : 'a list -> 'a list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/src/solver.ml
new/ocaml-ocamlbuild-0.14.0/src/solver.ml
--- old/ocamlbuild-0.11.0/src/solver.ml 2017-03-05 23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/src/solver.ml 2019-02-23 15:46:00.000000000
+0100
@@ -15,7 +15,6 @@
(* Original author: Nicolas Pouillard *)
open My_std
open Log
-open Format
open Outcome
type backtrace =
@@ -31,6 +30,7 @@
raise (Failed backtrace)
let rec pp_repeat f (n, s) =
+ let open Format in
if n > 0 then (pp_print_string f s; pp_repeat f (n - 1, s))
(* Targets must be normalized pathnames.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/testsuite/.gitignore
new/ocaml-ocamlbuild-0.14.0/testsuite/.gitignore
--- old/ocamlbuild-0.11.0/testsuite/.gitignore 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/testsuite/.gitignore 1970-01-01
01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-_test_internal
-_test_findlibonly
-_test_external
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/testsuite/external.ml
new/ocaml-ocamlbuild-0.14.0/testsuite/external.ml
--- old/ocamlbuild-0.11.0/testsuite/external.ml 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/testsuite/external.ml 2019-02-23
15:46:00.000000000 +0100
@@ -43,4 +43,17 @@
~targets:("parser.native",["parser.byte"])
();;
+let () = test "ppopt"
+ ~description:"Test the -ppopt option"
+ ~requirements:(package_exists "camlp4")
+ ~options:[`use_ocamlfind; `package "camlp4"; `syntax "camlp4o";
+ `tags ["ppopt(-no_quot)"];
+ ]
+ ~tree:[T.f "test.ml"
+ (* <<y>> looks like a camlp4 quotation and
+ will fail to compile unless '-no_quot' is passed *)
+ ~content:"let test (<<) (>>) x y z = x <<y>> z"]
+ ~targets:("test.cmo",[])
+ ();;
+
run ~root:"_test_external";;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/testsuite/internal.ml
new/ocaml-ocamlbuild-0.14.0/testsuite/internal.ml
--- old/ocamlbuild-0.11.0/testsuite/internal.ml 2017-03-05 23:48:09.000000000
+0100
+++ new/ocaml-ocamlbuild-0.14.0/testsuite/internal.ml 2019-02-23
15:46:00.000000000 +0100
@@ -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";
@@ -198,9 +205,18 @@
~description:"strict_sequence tag"
~tree:[T.f "hello.ml" ~content:"let () = 1; ()";
T.f "_tags" ~content:"true: strict_sequence\n"]
- ~failing_msg:"File \"hello.ml\", line 1, characters 9-10:
+ ~failing_msg:(if Sys.ocaml_version < "4.07.0" then
+"File \"hello.ml\", line 1, characters 9-10:
Error: This expression has type int but an expression was expected of type
- unit\nCommand exited with code 2."
+ unit
+Command exited with code 2."
+else
+"File \"hello.ml\", line 1, characters 9-10:
+Error: This expression has type int but an expression was expected of type
+ unit
+ because it is in the left-hand side of a sequence
+Command exited with code 2."
+)
~targets:("hello.byte",[]) ();;
let () = test "StrictFormatsFlag"
@@ -236,6 +252,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 +266,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 +296,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 +436,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 +448,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 +462,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 +482,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 +495,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:[
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/ocamlbuild-0.11.0/testsuite/internal_test_header.ml
new/ocaml-ocamlbuild-0.14.0/testsuite/internal_test_header.ml
--- old/ocamlbuild-0.11.0/testsuite/internal_test_header.ml 2017-03-05
23:48:09.000000000 +0100
+++ new/ocaml-ocamlbuild-0.14.0/testsuite/internal_test_header.ml
2019-02-23 15:46:00.000000000 +0100
@@ -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")