Skip to content

Commits on Source 4

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)"'; \
......
*.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 }
;
#
# 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,6 +7,8 @@
# 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)
......@@ -33,21 +35,18 @@ doc_html:
doc_man:
$(OCB) doc/api.docdir/man
doc_tex:
# the name of the .tex file can be anything
doc_tex:
$(OCB) doc/api.docdir/api.tex
doc_texinfo:
# the name of the .texi file can be anything
doc_texinfo:
$(OCB) doc/api.docdir/api.texi
doc_dot:
# the .dot graph represents inter-module dependencies
# as before, the name doesn't matter
doc_dot:
$(OCB) doc/api.docdir/api.dot
test: native
./main.native "OCaml" "OCamlBuild" "users"
.PHONY: all clean byte native profile debug test
#
# 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
../04-library/libdemo
\ No newline at end of file
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 ()
#
#
#
.PHONY: all test clean
all:
for d in [0-9]*-*; do $(MAKE) -C $$d all; done
......@@ -11,5 +8,3 @@ test:
clean:
for d in [0-9]*-*; do $(MAKE) -C $$d clean; done
......@@ -147,11 +147,6 @@ git tag <VERSION> -a
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 @@ you from forgetting to update them at the next release time.
== Making the release visible to our users ==
=== push it upstream ===
----
git push
git push --tags
----
[[opam-repo]]
=== opam-repository update ===
......