Commit f44a3fd8 authored by Stephane Glondu's avatar Stephane Glondu

Remove wrapper scripts and add copy rules for binaries

parent ae5339c9
......@@ -17,7 +17,3 @@ tree: _build/tree.html
_build/tree.html: _build/_digests
mkdir -p _build
tree -o $@ -H '..' -I '_build|_run|*~'
trustee-keygen:
ocamlbuild src/bin/trustee-keygen.native
@_build/src/bin/trustee-keygen.native
src/bin/trustee-keygen.native
src/bin/credgen.native
src/bin/election-tool.native
trustee-keygen
credgen
election-tool
open Ocamlbuild_plugin
let try_exec cmd =
Sys.command (cmd ^ " >/dev/null 2>&1") = 0
let has_ocamlopt = try_exec "which ocamlopt"
let native_compilation =
try Sys.getenv "OCAMLBEST" = "native"
with Not_found -> has_ocamlopt
let exe_suffix = if native_compilation then ".native" else ".byte"
let exe_rule name =
copy_rule name ("src/bin/" ^ name ^ exe_suffix) name
let atdgen_action opts env build =
let x = env "%.atd" in
......@@ -36,4 +49,9 @@ let () = dispatch & function
Cmd (S [A"markdown"; P (env "%.md"); Sh">"; P (env "%.html")])
);
(* binaries *)
exe_rule "credgen";
exe_rule "trustee-keygen";
exe_rule "election-tool";
| _ -> ()
#!/bin/sh
set -e
ocamlbuild -quiet src/bin/credgen.native
exec _build/src/bin/credgen.native "$@"
#!/bin/sh
set -e
ocamlbuild -quiet src/bin/election-tool.native
exec _build/src/bin/election-tool.native "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment