summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2013-05-08 18:03:54 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2013-05-08 18:03:54 +0200
commitdb38bb4ad9aff74576d3b7f00028d48f0447d5bd (patch)
tree09dafc3e5c7361d3a28e93677eadd2b7237d4f9f /build
parent6e34b272d789455a9be589e27ad3a998cf25496b (diff)
parent499a11a45b5711d4eaabe84a80f0ad3ae539d500 (diff)
Merge branch 'experimental/upstream' into upstream
Diffstat (limited to 'build')
-rwxr-xr-xbuild8
1 files changed, 6 insertions, 2 deletions
diff --git a/build b/build
index 69b47239..4fca642e 100755
--- a/build
+++ b/build
@@ -5,17 +5,21 @@ OCAMLBUILD=ocamlbuild
CFG=config/coq_config.ml
MYCFG=myocamlbuild_config.ml
+export CAML_LD_LIBRARY_PATH=`pwd`/_build/kernel/byterun
+
check_config() {
[ -f $CFG ] || (echo "please run ./configure first"; exit 1)
[ -L $MYCFG ] || ln -sf $CFG $MYCFG
}
-ocb() { $OCAMLBUILD $FLAGS $*; }
+# NB: we exec ocamlbuild and run ocb last for a correct exit code
+
+ocb() { exec $OCAMLBUILD $FLAGS $*; }
rule() {
check_config
case $1 in
- clean) ocb -clean && rm -rf bin/* && rm -f $MYCFG;;
+ clean) rm -rf bin/* $MYCFG && ocb -clean;;
all) ocb coq.otarget;;
win32) ocb coq-win32.otarget;;
*) ocb $1;;