Skip to content

Commit

Permalink
Allow use of wildcards for filename lines in _CoqProject
Browse files Browse the repository at this point in the history
  • Loading branch information
jfehrle committed Jul 11, 2022
1 parent 0e80597 commit 8504ea7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tools/coq_makefile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,19 @@ let generate_conf_files oc
{ v_files; mli_files; mlg_files; ml_files; mllib_files; mlpack_files; meta_file }
=
let module S = String in
let map = map_sourced_list in
let fout varname values =
fprintf oc "COQMF_%s = $(wildcard %s)\n" varname (S.concat " " (map_sourced_list quote values))
in
section oc "Project files.";
fprintf oc "COQMF_VFILES = %s\n" (S.concat " " (map quote v_files));
fprintf oc "COQMF_MLIFILES = %s\n" (S.concat " " (map quote mli_files));
fprintf oc "COQMF_MLFILES = %s\n" (S.concat " " (map quote ml_files));
fprintf oc "COQMF_MLGFILES = %s\n" (S.concat " " (map quote mlg_files));
fprintf oc "COQMF_MLPACKFILES = %s\n" (S.concat " " (map quote mlpack_files));
fprintf oc "COQMF_MLLIBFILES = %s\n" (S.concat " " (map quote mllib_files));
fout "VFILES" v_files;
fout "MLIFILES" mli_files;
fout "MLFILES" ml_files;
fout "MLGFILES" mlg_files;
fout "MLPACKFILES" mlpack_files;
fout "MLLIBFILES" mllib_files;
fprintf oc "COQMF_METAFILE = %s\n" (match meta_file with Present x -> x | _ -> "");
let cmdline_vfiles = filter_cmdline v_files in
fprintf oc "COQMF_CMDLINE_VFILES = %s\n" (S.concat " " (List.map quote cmdline_vfiles));
fprintf oc "COQMF_CMDLINE_VFILES = $(wildcard %s)\n" (S.concat " " (List.map quote cmdline_vfiles));
;;

let rec all_start_with prefix = function
Expand Down

0 comments on commit 8504ea7

Please sign in to comment.