summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2010-07-21 09:46:51 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2010-07-21 09:46:51 +0200
commit5b7eafd0f00a16d78f99a27f5c7d5a0de77dc7e6 (patch)
tree631ad791a7685edafeb1fb2e8faeedc8379318ae /build
parentda178a880e3ace820b41d38b191d3785b82991f5 (diff)
Imported Upstream snapshot 8.3~beta0+13298
Diffstat (limited to 'build')
-rwxr-xr-xbuild32
1 files changed, 32 insertions, 0 deletions
diff --git a/build b/build
new file mode 100755
index 00000000..69b47239
--- /dev/null
+++ b/build
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+FLAGS=
+OCAMLBUILD=ocamlbuild
+CFG=config/coq_config.ml
+MYCFG=myocamlbuild_config.ml
+
+check_config() {
+ [ -f $CFG ] || (echo "please run ./configure first"; exit 1)
+ [ -L $MYCFG ] || ln -sf $CFG $MYCFG
+}
+
+ocb() { $OCAMLBUILD $FLAGS $*; }
+
+rule() {
+ check_config
+ case $1 in
+ clean) ocb -clean && rm -rf bin/* && rm -f $MYCFG;;
+ all) ocb coq.otarget;;
+ win32) ocb coq-win32.otarget;;
+ *) ocb $1;;
+ esac;
+}
+
+if [ $# -eq 0 ]; then
+ rule all
+else
+ while [ $# -gt 0 ]; do
+ rule $1;
+ shift
+ done
+fi