aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/coq_makefile.ml
diff options
context:
space:
mode:
authorGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2017-08-29 13:54:46 +0200
committerGravatar Enrico Tassi <Enrico.Tassi@inria.fr>2017-08-29 17:47:57 +0200
commita93279fb7fe5917ab859e7b3dfb6f89522161419 (patch)
treeaeec78aa7cf69075e631fcd247fd4141d81beddc /tools/coq_makefile.ml
parent6e07e3a53e56882043b9db49f03fdf1470a16c46 (diff)
coq_makefile: print error message when coqlib is not set properly
Diffstat (limited to 'tools/coq_makefile.ml')
-rw-r--r--tools/coq_makefile.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml
index 0f38d1938..de76bf98b 100644
--- a/tools/coq_makefile.ml
+++ b/tools/coq_makefile.ml
@@ -114,13 +114,12 @@ let read_whole_file s =
close_in ic;
Buffer.contents b
-let makefile_template =
- let template = "/tools/CoqMakefile.in" in
- Coq_config.coqlib ^ template
-
let quote s = if String.contains s ' ' then "'" ^ s ^ "'" else s
let generate_makefile oc conf_file local_file args project =
+ let makefile_template =
+ let template = "/tools/CoqMakefile.in" in
+ Envars.coqlib () ^ template in
let s = read_whole_file makefile_template in
let s = List.fold_left
(fun s (k,v) -> Str.global_replace (Str.regexp_string k) v s) s
@@ -424,7 +423,7 @@ let _ =
check_overlapping_include project;
- Envars.set_coqlib ~fail:(fun x -> x);
+ Envars.set_coqlib ~fail:(fun x -> Printf.eprintf "Error: %s\n" x; exit 1);
let ocm = Option.cata open_out stdout project.makefile in
generate_makefile ocm conf_file local_file (prog :: args) project;