-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
port to dune, upgrade opam metadata and remove unused code
- removed vestigial ocamlbuild files (_tags) - port to dune (as dune 1.7 will issue jbuild deprecation warnings) - upgrade opam metadata to the 2.0 format - remove ocaml <4.01 support, as minimum version is now ocaml 4.02+ - restore -inline 1000 to build rules (dropped with jbuilder port)
- Loading branch information
Showing
25 changed files
with
156 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
_build/ | ||
*.native | ||
*.byte | ||
src/.merlin | ||
tests/.merlin | ||
ocplib-endian.install | ||
.merlin | ||
*.install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.PHONY: all clean test doc | ||
|
||
all: | ||
dune build | ||
|
||
clean: | ||
dune clean | ||
|
||
test: | ||
dune runtest | ||
|
||
doc: | ||
dune build @doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
(lang dune 1.0) | ||
(name ocplib-endian) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
opam-version: "1.2" | ||
opam-version: "2.0" | ||
name: "ocplib-endian" | ||
version: "1.1" | ||
descr: """ | ||
Optimised functions to read and write int16/32/64 from strings and bigarrays, based on new primitives added in version 4.01 | ||
|
||
synopsis: "Optimised functions to read and write int16/32/64 from strings and bigarrays" | ||
description: """ | ||
The library implements three modules: | ||
* [EndianString](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianString.mli) works directly on strings, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; | ||
* [EndianBytes](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianBytes.mli) works directly on bytes, and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; | ||
* [EndianBigstring](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianBigstring.mli) works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts; | ||
* [EndianBigstring](https://github.com/OCamlPro/ocplib-endian/blob/master/src/endianBigstring.mli) works on bigstrings (Bigarrays of chars), and provides submodules BigEndian and LittleEndian, with their unsafe counter-parts. | ||
""" | ||
maintainer: "pierre.chambart@ocamlpro.com" | ||
authors: "Pierre Chambart" | ||
homepage: "https://github.com/OCamlPro/ocplib-endian" | ||
bug-reports: "https://github.com/OCamlPro/ocplib-endian/issues" | ||
depends: [ | ||
"base-bytes" | ||
"ocaml" {>= "4.02.3"} | ||
"cppo" {>= "1.1.0"} | ||
"jbuilder" {build} | ||
"dune" {build & >= "1.0"} | ||
] | ||
build: [ | ||
["jbuilder" "build" "--only-packages" "ocplib-endian" "--root" "." "-j" jobs "@install"] | ||
] | ||
build-test: [ | ||
["jbuilder" "runtest" "--only-packages" "ocplib-endian" "--root" "." "-j" jobs] | ||
["dune" "build" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" name "-j" jobs] {with-test} | ||
] | ||
dev-repo: "git+https://github.com/OCamlPro/ocplib-endian.git" | ||
url { | ||
src: "https://github.com/OCamlPro/ocplib-endian/archive/1.0.tar.gz" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
[@@@warning "-32"] | ||
|
||
let sign8 v = | ||
(v lsl ( Sys.word_size - 9 )) asr ( Sys.word_size - 9 ) | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
(rule | ||
(targets endianString.mli) | ||
(deps (:< endianString.cppo.mli)) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(rule | ||
(targets endianString.ml) | ||
(deps | ||
(:< endianString.cppo.ml) | ||
common.ml | ||
common_401.ml) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(rule | ||
(targets endianBytes.mli) | ||
(deps | ||
(:< endianBytes.cppo.mli)) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(rule | ||
(targets endianBytes.ml) | ||
(deps | ||
(:< endianBytes.cppo.ml) | ||
common.ml | ||
common_401.ml) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(rule | ||
(targets endianBigstring.mli) | ||
(deps | ||
(:< endianBigstring.cppo.mli)) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(rule | ||
(targets endianBigstring.ml) | ||
(deps | ||
(:< endianBigstring.cppo.ml) | ||
common.ml | ||
common_401.ml) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(rule | ||
(targets common_401.ml) | ||
(deps | ||
(:< common_401.cppo.ml) | ||
be_ocaml_401.ml | ||
le_ocaml_401.ml | ||
ne_ocaml_401.ml | ||
common_float.ml) | ||
(action | ||
(run %{bin:cppo} %{<} -o %{targets}))) | ||
|
||
(library | ||
(name ocplib_endian) | ||
(public_name ocplib-endian) | ||
(synopsis "Optimised functions to read and write int16/32/64 from strings and bytes") | ||
(wrapped false) | ||
(ocamlopt_flags (:standard -inline 1000)) | ||
(modules endianString endianBytes) | ||
(libraries bytes)) | ||
|
||
(library | ||
(name ocplib_endian_bigstring) | ||
(public_name ocplib-endian.bigstring) | ||
(synopsis "Optimised functions to read and write int16/32/64 from bigarrays") | ||
(wrapped false) | ||
(modules endianBigstring) | ||
(ocamlopt_flags (:standard -inline 1000)) | ||
(libraries ocplib_endian bigarray bytes)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.