Skip to content

Commit

Permalink
Merge pull request #8 from yallop/topkg-dependency
Browse files Browse the repository at this point in the history
Switch to released topkg; use carcass-generated package layout.
  • Loading branch information
yallop authored Jun 13, 2016
2 parents cbedc5e + 4829ee9 commit 07b1301
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 468 deletions.
Empty file added CHANGES.md
Empty file.
File renamed without changes.
5 changes: 4 additions & 1 deletion _tags
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
<**/*.{ml,mli}> : bin_annot
true : bin_annot, safe_string, package(bytes)

<src> : include
<test> : include
26 changes: 26 additions & 0 deletions build
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/sh
# This script is only used for developement. It is removed by the
# distribution process.

set -e

OCAMLBUILD=${OCAMLBUILD:="ocamlbuild -use-ocamlfind -classic-display \
-tag debug"}

action ()
{
case $1 in
default) action lib-native ;;
lib-byte) $OCAMLBUILD higher.cma ;;
lib-native) $OCAMLBUILD higher.cmxa ;;
test|tests) $OCAMLBUILD test/tests.otarget ;;
doc) shift; topkg doc --dev $* ;;
api-doc) shift; topkg doc $* ;;
clean) $OCAMLBUILD -clean ;;
*) $OCAMLBUILD $* ;;
esac
}

if [ $# -eq 0 ];
then action default ;
else action $*; fi
11 changes: 7 additions & 4 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ homepage: "https://github.com/ocamllabs/higher"
bug-reports: "https://github.com/ocamllabs/higher/issues"
dev-repo: "https://github.com/ocamllabs/higher.git"
license: "MIT"
build: [
"ocaml" "pkg/build.ml" "native=%{ocaml-native}%"
"native-dynlink=%{ocaml-native-dynlink}%"
build:
[[ "ocaml" "pkg/pkg.ml" "build"
"--pinned" "%{pinned}%"]]
depends: [
"ocamlbuild" {build}
"ocamlfind" {build}
"topkg" {build}
]
depends: [ "ocamlbuild" {build} ]
tags: ["org:ocamllabs"]
7 changes: 4 additions & 3 deletions pkg/META
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version = "0.3.0"
description = "Library for higher-kinded programming"
version = "%%VERSION%%"
requires = ""
archive(byte) = "higher.cma"
archive(byte,plugin) = "higher.cma"
archive(native) = "higher.cmxa"
archive(native,plugin) = "higher.cmxs"
plugin(byte) = "higher.cma"
plugin(native) = "higher.cmxs"
8 changes: 8 additions & 0 deletions pkg/pkg.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg

let () =
Pkg.describe "higher" @@ fun c ->
Ok [ Pkg.mllib "src/higher.mllib" ]
Loading

0 comments on commit 07b1301

Please sign in to comment.