~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to ocamlbuild/ocaml_utils.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
  String.chomp (read_file ocamlc_where)
36
36
end
37
37
 
 
38
let pflag_and_dep tags ptag cmd_spec =
 
39
  Param_tags.declare ptag
 
40
    (fun param ->
 
41
       flag_and_dep (Param_tags.make ptag param :: tags) (cmd_spec param))
 
42
 
38
43
let module_name_of_filename f = String.capitalize (Pathname.remove_extensions f)
39
44
let module_name_of_pathname x =
40
45
  module_name_of_filename (Pathname.to_string (Pathname.basename x))
144
149
      let deps =
145
150
        List.fold_right begin fun (path, deps) acc ->
146
151
          let module_name' = module_name_of_pathname path in
147
 
          if module_name' = module_name 
 
152
          if module_name' = module_name
148
153
          then List.union deps acc
149
154
          else raise (Ocamldep_error(Printf.sprintf "Ocamldep.ocamldep: multiple files in ocamldep output (%s not expected)" path))
150
155
        end ocamldep_output [] in