- (* Set 'jobs' and related global variables. *)
- let () =
- let map = List.fold_left (
- fun map j ->
- let name = j.job_name in
- StringMap.add name j map
- ) StringMap.empty js in
- jobs := map in
-
- let () =
- let map = List.fold_left (
- fun map j ->
- let deps = dependencies_of_job j in
- let name = j.job_name in
- List.fold_left (
- fun map d ->
- let names = try StringMap.find d map with Not_found -> [] in
- StringMap.add d (name :: names) map
- ) map deps
- ) StringMap.empty js in
- dependencies := map in