diff options
author | Maxence Guesdon <maxence.guesdon@inria.fr> | 2003-07-04 10:02:13 +0000 |
---|---|---|
committer | Maxence Guesdon <maxence.guesdon@inria.fr> | 2003-07-04 10:02:13 +0000 |
commit | e64970f29dbbce99f28e1d29028854b95ee69f53 (patch) | |
tree | 597eaade14d885e9d685ea35d4dcd26f9fae2a60 /ocamldoc/odoc_html.ml | |
parent | a1434b747088633bd2dac2a5ad14ff7ace84aa0b (diff) |
Don't overwrite HTML and LateX style files, generate style file for LaTeX
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5656 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
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 ; |