diff options
| author | coqbot-app[bot] | 2021-03-03 21:52:11 +0000 |
|---|---|---|
| committer | GitHub | 2021-03-03 21:52:11 +0000 |
| commit | bb4e1a76802a5440605264320ed528331ec0e2b7 (patch) | |
| tree | a4ee40409c92afc6e563cac698e4ed08713cf051 /tools/coq_makefile.ml | |
| parent | a5bea627d1fe742229497b466ca24b470c20d269 (diff) | |
| parent | ab98d847d237af3cd0e46edef42218be65cfc98f (diff) | |
Merge PR #12567: [build] Split stdlib to it's own package.
Reviewed-by: Zimmi48
Ack-by: JasonGross
Ack-by: gares
Ack-by: LasseBlaauwbroek
Ack-by: silene
Ack-by: vbgl
Diffstat (limited to 'tools/coq_makefile.ml')
| -rw-r--r-- | tools/coq_makefile.ml | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 07550b67e3..cddb840693 100644 --- a/tools/coq_makefile.ml +++ b/tools/coq_makefile.ml @@ -125,8 +125,17 @@ let quote s = if String.contains s ' ' || CString.is_empty s then "'" ^ s ^ "'" let generate_makefile oc conf_file local_file dep_file args project = let coqlib = Envars.coqlib () in let makefile_template = - let template = Filename.concat "tools" "CoqMakefile.in" in - Filename.concat coqlib template in + CPath.choose_existing + [ CPath.make [ coqlib; "tools"; "CoqMakefile.in" ] + ; CPath.make [ coqlib; ".."; "coq-core"; "tools"; "CoqMakefile.in" ] + ] + in + let makefile_template = match makefile_template with + | None -> + Format.eprintf "Error: cannot find CoqMakefile.in"; + exit 1 + | Some v -> (v :> string) + in let s = read_whole_file makefile_template in let s = List.fold_left (* We use global_substitute to avoid running into backslash issues due to \1 etc. *) |
