diff options
author | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-06-12 13:10:22 +0000 |
---|---|---|
committer | pboutill <pboutill@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-06-12 13:10:22 +0000 |
commit | 06420628551c88520ad344cf9441d964d02260dc (patch) | |
tree | fb7eaab3a7dc3aafa69480f1c2cde7119e2c01bb /lib/envars.ml | |
parent | 28ebb9d82d983e737aaf77034f1a7c4a2719396b (diff) |
bug 2805: Only export CAMLP4LIB if camlp4 -where ends successfully
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15434 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/envars.ml')
-rw-r--r-- | lib/envars.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/envars.ml b/lib/envars.ml index 71525f055..1190e7a36 100644 --- a/lib/envars.ml +++ b/lib/envars.ml @@ -185,7 +185,7 @@ let camlp4lib () = else let camlp4bin = camlp4bin () in let com = (Filename.concat camlp4bin Coq_config.camlp4) ^ " -where" in - let _,res = CUnix.run_command (fun x -> x) (fun _ -> ()) com in - Util.strip res - - + let ex,res = CUnix.run_command (fun x -> x) (fun _ -> ()) com in + match ex with + |Unix.WEXITED 0 -> Util.strip res + |_ -> "/dev/null" |