summaryrefslogtreecommitdiff
path: root/ocamldoc/odoc_latex.ml
diff options
context:
space:
mode:
authorMaxence Guesdon <maxence.guesdon@inria.fr>2004-04-02 15:20:39 +0000
committerMaxence Guesdon <maxence.guesdon@inria.fr>2004-04-02 15:20:39 +0000
commit31d4326219fafdd0c701ca0445c3b64f22cb9830 (patch)
tree8dd1bf7196e64c6a37dfd94b72accb3c5df9fdf1 /ocamldoc/odoc_latex.ml
parent1ac475fbbedbe4183693cad50331e8c2ab951e7a (diff)
downloadocaml-31d4326219fafdd0c701ca0445c3b64f22cb9830.tar.gz
fix: when generating separated files in latex, generate them in
the same directory than the main file, (the one specified by -o) git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6186 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_latex.ml')
-rw-r--r--ocamldoc/odoc_latex.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/ocamldoc/odoc_latex.ml b/ocamldoc/odoc_latex.ml
index 39d1c9c737..ebd51a96db 100644
--- a/ocamldoc/odoc_latex.ml
+++ b/ocamldoc/odoc_latex.ml
@@ -1074,12 +1074,14 @@ class latex =
(** Generate the LaTeX file from a module list, in the {!Odoc_info.Args.out_file} file. *)
method generate module_list =
self#generate_style_file ;
+ let main_file = !Args.out_file in
+ let dir = Filename.dirname main_file in
if !Args.separate_files then
(
let f m =
try
let chanout =
- open_out ((Filename.concat !Args.target_dir (Name.simple m.m_name))^".tex")
+ open_out ((Filename.concat dir (Name.simple m.m_name))^".tex")
in
let fmt = Format.formatter_of_out_channel chanout in
self#generate_for_top_module fmt m ;
@@ -1095,7 +1097,7 @@ class latex =
);
try
- let chanout = open_out !Args.out_file in
+ let chanout = open_out main_file in
let fmt = Format.formatter_of_out_channel chanout in
if !Args.with_header then self#latex_header fmt;
List.iter