X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=generator%2Fgenerator_main.ml;h=f3d3340aac3a4f2f882b214b4adbd059d8ed493a;hb=ce5a8978b54f409de4347f16f7065b063cb47cf1;hp=bf1e8e0b70b4d116843ce0cf19d293f7d9c90bc0;hpb=6263da7474c6e7818b025979712c9c5d7108640d;p=libguestfs.git diff --git a/generator/generator_main.ml b/generator/generator_main.ml index bf1e8e0..f3d3340 100644 --- a/generator/generator_main.ml +++ b/generator/generator_main.ml @@ -50,7 +50,7 @@ let perror msg = function (* Main program. *) let () = let lock_fd = - try openfile "HACKING" [O_RDWR] 0 + try openfile "BUGS" [O_RDWR] 0 with | Unix_error (ENOENT, _, _) -> eprintf "\ @@ -60,7 +60,7 @@ Run it from the top source directory using the command "; exit 1 | exn -> - perror "open: HACKING" exn; + perror "open: BUGS" exn; exit 1 in (* Acquire a lock so parallel builds won't try to run the generator @@ -70,7 +70,7 @@ Run it from the top source directory using the command *) (try lockf lock_fd F_LOCK 1 with exn -> - perror "lock: HACKING" exn; + perror "lock: BUGS" exn; exit 1); (* Read the API versions file. *) @@ -132,11 +132,15 @@ Run it from the top source directory using the command output_to "php/extension/php_guestfs_php.h" generate_php_h; output_to "php/extension/guestfs_php.c" generate_php_c; + (* Generate the list of files generated -- last. *) + printf "generated %d lines of code\n" (get_lines_generated ()); + let files = List.sort compare (get_files_generated ()) in + output_to "generator/files-generated.txt" + (fun () -> List.iter (pr "%s\n") files); + (* Always generate this file last, and unconditionally. It's used * by the Makefile to know when we must re-run the generator. *) let chan = open_out "generator/stamp-generator" in fprintf chan "1\n"; - close_out chan; - - printf "generated %d lines of code\n" (get_lines_generated ()) + close_out chan