aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar lmamane <lmamane@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-03-22 01:14:20 +0000
committerGravatar lmamane <lmamane@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-03-22 01:14:20 +0000
commitf31eba812921f3f030d1288140eb8cd200628728 (patch)
tree786b73bf49499d9e1ec6c3c4840aec176029b65b /tools
parent3c3c70e20208262952b90ab4abb5090a62f16b64 (diff)
A tentative fix for bug #1455
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9726 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'tools')
-rw-r--r--tools/coqdoc/cdglobals.ml8
-rw-r--r--tools/coqdoc/main.ml3
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/coqdoc/cdglobals.ml b/tools/coqdoc/cdglobals.ml
index 8a774876d..c9620a6f1 100644
--- a/tools/coqdoc/cdglobals.ml
+++ b/tools/coqdoc/cdglobals.ml
@@ -26,9 +26,15 @@ let out_to = ref MultFiles
let out_channel = ref stdout
let open_out_file f =
- let f = if !output_dir <> "" then Filename.concat !output_dir f else f in
+ prerr_string f; prerr_newline();
+ let f = if !output_dir <> "" && Filename.is_relative f then Filename.concat !output_dir f else f in
out_channel := open_out f
+let open_temp_out_file prefix suffix =
+ let tmp_fname, tmp_ochan = Filename.open_temp_file prefix suffix in
+ out_channel := tmp_ochan;
+ tmp_fname
+
let close_out_file () = close_out !out_channel
diff --git a/tools/coqdoc/main.ml b/tools/coqdoc/main.ml
index 90b15b64d..e02d7c7dc 100644
--- a/tools/coqdoc/main.ml
+++ b/tools/coqdoc/main.ml
@@ -449,9 +449,8 @@ let produce_output fl =
if not (!dvi || !ps) then begin
produce_document fl
end else begin
- let texfile = temp_file "coqdoc" ".tex" in
+ let texfile = open_temp_out_file "coqdoc" ".tex" in
let basefile = chop_suffix texfile ".tex" in
- open_out_file texfile;
produce_document fl;
let command =
let file = basename texfile in