Skip to content

Commit

Permalink
build: make opam-format a depopt
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Feb 16, 2017
1 parent 6035da7 commit 3af589d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## ?? (unrelease)
## 0.9.0 (2017-02-16)

* initial release
7 changes: 6 additions & 1 deletion opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ maintainer: ["Hannes Mehnert <[email protected]>"]
license: "BSD2"

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

build-test: [
Expand All @@ -29,4 +30,8 @@ depends: [
"alcotest" {test}
"logs" "fmt" "rresult" "astring"
]

depopts: [
"opam-format"
]
available: [ ocaml-version >= "4.03.0" ]
9 changes: 6 additions & 3 deletions pkg/pkg.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@
open Topkg

let nocrypto = Conf.with_pkg (* ~default:false *) "nocrypto"
let format = Conf.with_pkg ~default:false "format"

let () =
Pkg.describe "conex" @@ fun c ->
let nocrypto = Conf.value c nocrypto in
let nocrypto = Conf.value c nocrypto
and format = Conf.value c format
in
Ok [
Pkg.mllib "src/conex.mllib" ;
Pkg.mllib ~cond:nocrypto "src/nocrypto/conex-nocrypto.mllib" ;
(* Pkg.bin "analysis/maintainer" ;
Pkg.bin "analysis/opam_repo_stats" ; *)
Pkg.bin ~cond:format ~dst:"conex_maintainer" "analysis/maintainer" ;
Pkg.bin ~cond:format ~dst:"conex_repo_stats" "analysis/opam_repo_stats" ;
Pkg.bin "app/conex_author" ;
Pkg.bin "app/conex_verify_openssl" ;
Pkg.bin "app/conex_verify_nocrypto" ;
Expand Down

0 comments on commit 3af589d

Please sign in to comment.