diff options
| author | Ralf Jung | 2017-10-10 16:21:00 +0200 |
|---|---|---|
| committer | Ralf Jung | 2017-10-10 16:59:14 +0200 |
| commit | 8330c0b1da55a29d0b23dc452f4749be52cc3e8e (patch) | |
| tree | 81ad05ac2e99381f8fb89fc9cfe0b7038d836b5a | |
| parent | b6d4575e39d32d276bed84ccb6b2b67a2e7bccb6 (diff) | |
Fix BZ#5780: coq_makefile broken under Cygwin
| -rw-r--r-- | tools/coq_makefile.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 4a9d871fd3..2feaaa04cd 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; |
