From ad8bf70ccc61849cfb1ade20ce426ea2ec74aa0e Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 17 Jul 2017 18:05:34 +0200 Subject: coq-makefile: strip windows drive letter when DESTDIR is not empty In unix one can concatenate a prefix with an absolute path in order to obtain a valid path. This is not the case on Windows. --- tools/coq_makefile.ml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools/coq_makefile.ml') diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 0e0375c008..327f53520c 100644 --- a/tools/coq_makefile.ml +++ b/tools/coq_makefile.ml @@ -193,12 +193,19 @@ let generate_conf_includes oc { ml_includes; r_includes; q_includes } = (S.concat " " (map (fun ({ path },l) -> dash2 "R" path l) r_includes)) ;; +let windrive s = + if Coq_config.arch_is_win32 && Str.(string_match (regexp "^[a-zA-Z]:") s 0) + then Str.matched_string s + else s +;; + let generate_conf_coq_config oc args bypass_API = section oc "Coq configuration."; let src_dirs = if bypass_API then Coq_config.all_src_dirs else Coq_config.api_dirs @ Coq_config.plugins_dirs @ ["-open API"] in Envars.print_config ~prefix_var_name:"COQMF_" oc src_dirs; + fprintf oc "COQMF_WINDRIVE=%s\n" (windrive Coq_config.coqlib) ;; let generate_conf_files oc -- cgit v1.2.3