forked from dbuenzli/cmdliner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dbuenzli#1 from emillon/1.1.1-dune
Merge upstream 1.1.1
- Loading branch information
Showing
69 changed files
with
3,462 additions
and
2,532 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,10 +1,6 @@ | ||
_build | ||
_b0 | ||
tmp | ||
*~ | ||
\.\#* | ||
\#*# | ||
*.byte | ||
*.native | ||
cmdliner.install | ||
src/.merlin |
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,4 @@ | ||
# PKG b0.kit | ||
S src | ||
S test | ||
B _build/** | ||
B _b0/** |
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,9 +1,65 @@ | ||
open B0 | ||
open B0_kit.V000 | ||
open B00_std | ||
|
||
let cmdliner = "cmdliner" | ||
let doc = "Declarative definition of command line interfaces for OCaml" | ||
(* OCaml library names *) | ||
|
||
let pkg = Pkg.create cmdliner ~doc | ||
let lib = | ||
let srcs = (`Src_dirs [Fpath.v "src"]) in | ||
B0_ocaml.Unit.lib ~pkg cmdliner srcs ~doc | ||
let cmdliner = B0_ocaml.libname "cmdliner" | ||
|
||
(* Units *) | ||
|
||
let cmdliner_lib = | ||
let srcs = Fpath.[`Dir (v "src")] in | ||
B0_ocaml.lib cmdliner ~doc:"The cmdliner library" ~srcs ~requires:[] | ||
|
||
(* Tests *) | ||
|
||
let test ?doc t = | ||
let srcs = [`File (Fpath.v (Fmt.str "test/%s.ml" t))] in | ||
let requires = [cmdliner] in | ||
let meta = B0_meta.(empty |> tag test) in | ||
B0_ocaml.exe t ?doc ~srcs ~requires ~meta | ||
|
||
let chorus = test "chorus" | ||
let cp_ex = test "cp_ex" | ||
let darcs_ex = test "darcs_ex" | ||
let revolt = test "revolt" | ||
let rm_ex = test "rm_ex" | ||
let tail_ex = test "tail_ex" | ||
let tail_ex = test "test_nest" | ||
let test_dupe_stdopts = test "test_dupe_stdopts" | ||
let test_man = test "test_man" | ||
let test_man_utf8 = test "test_man_utf8" | ||
let test_opt_req = test "test_opt_req" | ||
let test_pos = test "test_pos" | ||
let test_pos_all = test "test_pos_all" | ||
let test_pos_left = test "test_pos_left" | ||
let test_pos_req = test "test_pos_req" | ||
let test_pos_rev = test "test_pos_rev" | ||
let test_term_dups = test "test_term_dups" | ||
let test_with_used_args = test "test_with_used_args" | ||
|
||
(* Packs *) | ||
|
||
let default = | ||
let meta = | ||
let open B0_meta in | ||
empty | ||
|> add authors ["The cmdliner programmers"] | ||
|> add maintainers ["Daniel Bünzli <daniel.buenzl [email protected]>"] | ||
|> add homepage "https://erratique.ch/software/cmdliner" | ||
|> add online_doc "https://erratique.ch/software/cmdliner/doc" | ||
|> add issues "https://github.com/dbuenzli/cmdliner/issues" | ||
|> add repo "git+https://erratique.ch/repos/cmdliner.git" | ||
|> add licenses ["ISC"] | ||
|> add description_tags ["cli"; "system"; "declarative"; "org:erratique"] | ||
|> tag B0_opam.tag | ||
|> add B0_opam.Meta.depends | ||
[ "ocaml", {|>= "4.08.0"|}; ] | ||
|> add B0_opam.Meta.build | ||
{|[[ make "all" "PREFIX=%{prefix}%" ]]|} | ||
|> add B0_opam.Meta.install | ||
{|[[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"] | ||
[make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"]]|} | ||
in | ||
B0_pack.v "default" ~doc:"cmdliner package" ~meta ~locked:true @@ | ||
B0_unit.list () |
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 @@ | ||
(srcs-x build.ml test pkg) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,8 +17,6 @@ Cmdliner has no dependencies and is distributed under the ISC license. | |
[2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html | ||
|
||
Home page: http://erratique.ch/software/cmdliner | ||
Contact: Daniel Bünzli `<daniel.buenzl [email protected]>` | ||
|
||
|
||
## Installation | ||
|
||
|
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,4 @@ | ||
true : bin_annot, safe_string | ||
<_b0> : -traverse | ||
<src> : include | ||
<test> : include |
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 |
---|---|---|
@@ -1,14 +1,31 @@ | ||
opam-version: "2.0" | ||
maintainer: "Daniel Bünzli <daniel.buenzl [email protected]>" | ||
authors: ["Daniel Bünzli <daniel.buenzl [email protected]>"] | ||
homepage: "http://erratique.ch/software/cmdliner" | ||
doc: "http://erratique.ch/software/cmdliner/doc/Cmdliner" | ||
dev-repo: "git+http://erratique.ch/repos/cmdliner.git" | ||
name: "cmdliner" | ||
synopsis: """Declarative definition of command line interfaces for OCaml""" | ||
maintainer: ["Daniel Bünzli <daniel.buenzl [email protected]>"] | ||
authors: ["The cmdliner programmers"] | ||
homepage: "https://erratique.ch/software/cmdliner" | ||
doc: "https://erratique.ch/software/cmdliner/doc" | ||
dev-repo: "git+https://erratique.ch/repos/cmdliner.git" | ||
bug-reports: "https://github.com/dbuenzli/cmdliner/issues" | ||
tags: [ "cli" "system" "declarative" "org:erratique" ] | ||
license: "ISC" | ||
depends:[ "ocaml" {>= "4.03.0"} ] | ||
license: ["ISC"] | ||
tags: ["cli" "system" "declarative" "org:erratique"] | ||
depends: ["ocaml" {>= "4.08.0"}] | ||
build: [[ make "all" "PREFIX=%{prefix}%" ]] | ||
install: | ||
[[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%" ] | ||
[make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%" ]] | ||
install: [[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"] | ||
[make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%"]] | ||
description: """ | ||
Cmdliner allows the declarative definition of command line interfaces | ||
for OCaml. | ||
|
||
It provides a simple and compositional mechanism to convert command | ||
line arguments to OCaml values and pass them to your functions. The | ||
module automatically handles syntax errors, help messages and UNIX man | ||
page generation. It supports programs with single or multiple commands | ||
and respects most of the [POSIX][1] and [GNU][2] conventions. | ||
|
||
Cmdliner has no dependencies and is distributed under the ISC license. | ||
|
||
[1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html | ||
[2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html | ||
|
||
Home page: http://erratique.ch/software/cmdliner""" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.