summaryrefslogtreecommitdiff
path: root/ocaml-binary-annot/ocamlbuild/test/test8/myocamlbuild.ml
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml-binary-annot/ocamlbuild/test/test8/myocamlbuild.ml')
-rw-r--r--ocaml-binary-annot/ocamlbuild/test/test8/myocamlbuild.ml16
1 files changed, 16 insertions, 0 deletions
diff --git a/ocaml-binary-annot/ocamlbuild/test/test8/myocamlbuild.ml b/ocaml-binary-annot/ocamlbuild/test/test8/myocamlbuild.ml
new file mode 100644
index 0000000000..f2818b6564
--- /dev/null
+++ b/ocaml-binary-annot/ocamlbuild/test/test8/myocamlbuild.ml
@@ -0,0 +1,16 @@
+open Ocamlbuild_plugin;;
+let version = "0.1";;
+dispatch begin function
+ | After_rules ->
+ rule "myconfig.ml"
+ ~prod:"myconfig.ml"
+ begin fun _ _ ->
+ Echo(["let version = \""; version; "\";;\n"], "myconfig.ml")
+ end;
+
+ copy_rule "copy byte-code executables" "%(path).byte" "%(path:not <**/*.*>)";
+ copy_rule "copy native executables" "%(path).native" "%(path:not <**/*.*>).opt";
+ copy_rule "copy binaries to bin" "%(basename).%(extension)"
+ "bin/%(basename).%(extension:<{byte,native}>)";
+ | _ -> ()
+end