aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/coq_makefile.ml
diff options
context:
space:
mode:
authorGravatar Ralf Jung <post@ralfj.de>2017-10-10 16:21:00 +0200
committerGravatar Ralf Jung <post@ralfj.de>2017-10-10 16:59:14 +0200
commit8330c0b1da55a29d0b23dc452f4749be52cc3e8e (patch)
tree81ad05ac2e99381f8fb89fc9cfe0b7038d836b5a /tools/coq_makefile.ml
parentb6d4575e39d32d276bed84ccb6b2b67a2e7bccb6 (diff)
Fix BZ#5780: coq_makefile broken under Cygwin
Diffstat (limited to 'tools/coq_makefile.ml')
-rw-r--r--tools/coq_makefile.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml
index 4a9d871fd..2feaaa04c 100644
--- a/tools/coq_makefile.ml
+++ b/tools/coq_makefile.ml
@@ -122,7 +122,8 @@ let generate_makefile oc conf_file local_file args project =
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
+ (* We use global_substitute to avoid running into backslash issues due to \1 etc. *)
+ (fun s (k,v) -> Str.global_substitute (Str.regexp_string k) (fun _ -> v) s) s
[ "@CONF_FILE@", conf_file;
"@LOCAL_FILE@", local_file;
"@COQ_VERSION@", Coq_config.version;