~ubuntu-branches/ubuntu/wily/coq-doc/wily

« back to all changes in this revision

Viewing changes to tools/coqdoc/main.ml

  • Committer: Package Import Robot
  • Author(s): Stéphane Glondu
  • Date: 2012-01-03 23:42:48 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20120103234248-p9r8h1579n67v55a
Tags: 8.3pl3-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
(* -*- compile-command: "make -C ../.. bin/coqdoc" -*- *)
2
2
(************************************************************************)
3
3
(*  v      *   The Coq Proof Assistant  /  The Coq Development Team     *)
4
 
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2010     *)
 
4
(* <O___,, *   INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2011     *)
5
5
(*   \VV/  **************************************************************)
6
6
(*    //   *      This file is distributed under the terms of the       *)
7
7
(*         *       GNU Lesser General Public License Version 2.1        *)
8
8
(************************************************************************)
9
9
 
10
 
(*i $Id: main.ml 13323 2010-07-24 15:57:30Z herbelin $ i*)
 
10
(*i $Id: main.ml 14641 2011-11-06 11:59:10Z herbelin $ i*)
11
11
 
12
12
(* Modified by Lionel Elie Mamane <lionel@mamane.lu> on 9 & 10 Mar 2004:
13
13
 *  - handling of absolute filenames (function coq_module)
135
135
 
136
136
(* turn A/B/C into A.B.C *)
137
137
let rec name_of_path p name dirname suffix =
138
 
  if p = dirname then String.concat "." (name::suffix)
 
138
  if p = dirname then String.concat "." (if name = "" then suffix else (name::suffix))
139
139
  else
140
140
    let subdir = Filename.dirname dirname in
141
141
    if subdir = dirname then raise Not_found