package ocb-stubblr
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
OCamlbuild plugin for C stubs
Install
dune-project
Dependency
Authors
Maintainers
Sources
ocb-stubblr-0.1.1.tbz
sha256=4e9c4fd031e008a65f14a0f3bf6914fa6632ab054aad8670dcb30621433feb98
md5=607720dd18ca51e40645b42df5c1273e
doc/src/ocb-stubblr.topkg/ocb_stubblr_topkg.ml.html
Source file ocb_stubblr_topkg.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33(* Copyright (c) 2016 David Kaloper Meršinjak. All rights reserved. See LICENSE.md. *) open Topkg let build_arg = Cmd.(v "-plugin-tag" % "package(ocb-stubblr)") let build_cmd c os = Cmd.(Pkg.build_cmd c os %% build_arg) let cmd c os files = OS.Cmd.run @@ Cmd.(%%) (build_cmd c os) (Cmd.of_list files) (* Vs Pkg.clib: - .clib file can be generated; - installs only the static part (libFOO.a); - no ~lib_dst_dir; - no source debugging support. *) let clib_static ?(cond = false) clib = if not cond then Pkg.nothing else let name = Fpath.(rem_ext clib |> basename) in Log.on_error_msg ~use:(fun () -> Pkg.nothing) @@ if Fpath.get_ext clib = ".clib" && String.is_prefix ~affix:"lib" name then let base = String.with_index_range ~first:3 name and dir = Fpath.dirname clib in Ok (Pkg.lib ~exts:Exts.c_library Fpath.(dir // "lib" ^ base)) else R.error_msgf "%s: OCamlbuild .clib must be lib<base>.clib" clib let mirage ?(xen=false) ?(fs=false) path = let tpath target = let (dir, base) = Fpath.(dirname path, basename path) in let (name, ext) = Fpath.(rem_ext base, get_ext base) in Fpath.("X"//target//dir//name^"+"^target^ext) in Pkg.flatten [ clib_static ~cond:xen (tpath "mirage-xen"); clib_static ~cond:fs (tpath "mirage-freestanding"); ]
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>