Project

General

Profile

Revision 990210f3 src/modules.ml

View differences:

src/modules.ml
113 113
    | _       -> assert false
114 114
  with Not_found -> Hashtbl.add consts_table name value
115 115

  
116
let name_dependency (local, dep) =
117
  ((if local then !Options.dest_dir else !Options.include_dir) ^ "/") ^ dep
118

  
119 116
let import_dependency_aux loc (local, dep) =
120
  let basename = name_dependency (local, dep) in
117
  let basename = Options.name_dependency (local, dep) in
121 118
  let extension = ".lusic" in 
122 119
  try
123 120
    let lusic = Lusic.read_lusic basename extension in
......
161 158
    | Const c -> (add_const true c.const_id decl; imported)
162 159
    | TypeDef tdef -> (add_type true tdef.tydef_id decl; imported)
163 160
    | Open (local, dep) ->
164
       let basename = name_dependency (local, dep) in
161
       let basename = Options.name_dependency (local, dep) in
165 162
       if ISet.mem basename imported then imported else
166 163
	 let lusic = import_dependency_aux decl.top_decl_loc (local, dep)
167 164
	 in load_header_rec (ISet.add basename imported) lusic.Lusic.contents
......
186 183
    | Const c -> (add_const false c.const_id decl; imported)
187 184
    | TypeDef tdef -> (add_type false tdef.tydef_id decl; imported)
188 185
    | Open (local, dep) ->
189
       let basename = name_dependency (local, dep) in
186
       let basename = Options.name_dependency (local, dep) in
190 187
       if ISet.mem basename imported then imported else
191 188
	 let lusic = import_dependency_aux decl.top_decl_loc (local, dep)
192 189
	 in load_header_rec (ISet.add basename imported) lusic.Lusic.contents

Also available in: Unified diff