diff options
Diffstat (limited to 'ocamldoc/odoc_html.ml')
-rw-r--r-- | ocamldoc/odoc_html.ml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/ocamldoc/odoc_html.ml b/ocamldoc/odoc_html.ml index 4dbe44aeb..8b1480b54 100644 --- a/ocamldoc/odoc_html.ml +++ b/ocamldoc/odoc_html.ml @@ -582,10 +582,17 @@ class html = let default_style = String.concat "\n" default_style_options in ( try - let chanout = open_out (Filename.concat !Args.target_dir style_file) in - output_string chanout default_style ; - flush chanout ; - close_out chanout + let file = Filename.concat !Args.target_dir style_file in + if Sys.file_exists file then + Odoc_info.verbose (Odoc_messages.file_exists_dont_generate file) + else + ( + let chanout = open_out file in + output_string chanout default_style ; + flush chanout ; + close_out chanout; + Odoc_info.verbose (Odoc_messages.file_generated file) + ) with Sys_error s -> prerr_endline s ; |