summaryrefslogtreecommitdiffstats
path: root/ocamlbuild/examples/example3/make.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ocamlbuild/examples/example3/make.sh')
-rwxr-xr-xocamlbuild/examples/example3/make.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/ocamlbuild/examples/example3/make.sh b/ocamlbuild/examples/example3/make.sh
new file mode 100755
index 000000000..3588a713f
--- /dev/null
+++ b/ocamlbuild/examples/example3/make.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+set -e
+
+TARGET=epoch
+FLAGS="-libs unix,nums"
+OCAMLBUILD=ocamlbuild
+
+ocb()
+{
+ $OCAMLBUILD $FLAGS $*
+}
+
+rule() {
+ case $1 in
+ clean) ocb -clean;;
+ native) ocb $TARGET.native;;
+ byte) ocb $TARGET.byte;;
+ all) ocb $TARGET.native $TARGET.byte;;
+ depend) echo "Not needed.";;
+ *) echo "Unknown action $1";;
+ esac;
+}
+
+if [ $# -eq 0 ]; then
+ rule all
+else
+ while [ $# -gt 0 ]; do
+ rule $1;
+ shift
+ done
+fi