Skip to content

Commit

Permalink
Merge pull request #26 from hannesm/minor
Browse files Browse the repository at this point in the history
optionally depend on cmdliner
  • Loading branch information
dinosaure authored Mar 10, 2017
2 parents 2cdef5e + 8f99f99 commit fd12c8f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
15 changes: 12 additions & 3 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ bug-reports: "https://github.com/oklm-wsh/Decompress/issues"
dev-repo: "https://github.com/oklm-wsh/Decompress.git"
license: "MIT"

build: [ "ocaml" "pkg/pkg.ml" "build" "--pinned" pinned ]
build: [
"ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "false"
"--with-cmdliner" "%{cmdliner:installed}%"
]

build-test: [ [ "ocaml" "pkg/pkg.ml" "build" "--pinned" pinned "--tests" "true" ]
[ "ocaml" "pkg/pkg.ml" "test" ] ]
build-test: [
[ "ocaml" "pkg/pkg.ml" "build" "--pinned" "%{pinned}%" "--tests" "true" ]
[ "ocaml" "pkg/pkg.ml" "test" ]
]

depends: [
"ocamlbuild" {build}
Expand All @@ -23,4 +28,8 @@ depends: [
"alcotest" {test}
]

depopts: [
"cmdliner"
]

available: [ocaml-version >= "4.03.0"]
7 changes: 2 additions & 5 deletions pkg/pkg.ml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
#!/usr/bin/env ocaml

#directory "pkg";;
#use "topfind";;
#require "topkg";;

open Topkg

let unix = Conf.with_pkg "unix"
let cmdliner = Conf.with_pkg "cmdliner"
let opam = Pkg.opam_file ~lint_deps_excluding:None "opam"
let cmdliner = Conf.with_pkg ~default:false "cmdliner"

let () =
Pkg.describe ~opams:[opam] "decompress" @@ fun c ->
Pkg.describe "decompress" @@ fun c ->

let unix = Conf.value c unix in
let cmdliner = Conf.value c cmdliner in
Expand Down

0 comments on commit fd12c8f

Please sign in to comment.