3 type source_object = string
4 type target_object = string
5 let string_of_source_object s = s
6 let string_of_target_object s = s
7 let target_of s = s ^ ".o"
9 print_string ("build "^t^"\n"); flush stdout;
10 ignore(Unix.system ("touch "^target_of t))
12 let mtime_of_source_object s =
13 try Some (Unix.stat s).Unix.st_mtime
14 with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = s ->
15 prerr_endline ("Source file not found: "^s);assert false
17 let mtime_of_target_object t =
18 try Some (Unix.stat t).Unix.st_mtime
19 with Unix.Unix_error (Unix.ENOENT, "stat", f) when f = t -> None
23 module M = Make.Make(F)
26 "a.c", [ "b.c"; "d.c" ];
27 "b.c", [ "c.c"; "d.c" ];
34 M.make deps (Array.to_list Sys.argv);;