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

« back to all changes in this revision

Viewing changes to myocamlbuild.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-06-24 12:47:31 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090624124731-7wao0d0mnk4d71ee
Remove build-dependency to docbook-* (not needed anymore, since
policy has been moved to dh-ocaml)

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
(*                                                                     *)
11
11
(***********************************************************************)
12
12
 
13
 
(* $Id: myocamlbuild.ml,v 1.23.2.2 2008/10/23 15:29:11 ertai Exp $ *)
 
13
(* $Id: myocamlbuild.ml,v 1.23.2.7 2009/06/04 11:33:21 doligez Exp $ *)
14
14
 
15
15
open Ocamlbuild_plugin
16
16
open Command
131
131
                    "stdlib/std_exit.cmx"; "stdlib/std_exit"-.-C.o] in
132
132
  let byte_deps = ["ocamlc"; "stdlib/stdlib.cma"; "stdlib/std_exit.cmo"] in
133
133
  fun () ->
 
134
    if Pathname.exists "../ocamlcomp.sh" then S[A"../ocamlcomp.sh"] else
134
135
    if List.for_all Pathname.exists native_deps then
135
136
      S[A"./ocamlc.opt"; A"-nostdlib"]
136
137
    else if List.for_all Pathname.exists byte_deps then
141
142
Command.setup_virtual_command_solver "OCAMLCWIN" (convert_for_windows_shell ocamlc_solver);;
142
143
 
143
144
let ocamlopt_solver () =
144
 
  S[if Pathname.exists "ocamlopt.opt" && Pathname.exists ("stdlib/stdlib.cmxa")
 
145
  S[if Pathname.exists "../ocamlcompopt.sh" then S[A"../ocamlcompopt.sh"] else
 
146
    if Pathname.exists "ocamlopt.opt" && Pathname.exists ("stdlib/stdlib.cmxa")
145
147
    then A"./ocamlopt.opt"
146
148
    else S[ocamlrun; A"./ocamlopt"];
147
149
    A"-nostdlib"];;
341
343
copy_rule' "lex/main.native" "lex/ocamllex.opt";;
342
344
copy_rule' "debugger/main.byte" "debugger/ocamldebug";;
343
345
copy_rule' "ocamldoc/odoc.byte" "ocamldoc/ocamldoc";;
344
 
copy_rule' "ocamldoc/odoc_opt.native" "ocamldoc/ocamldoc.opt";;
 
346
copy_rule' "ocamldoc/odoc.native" "ocamldoc/ocamldoc.opt";;
345
347
copy_rule' "tools/ocamlmklib.byte" "tools/ocamlmklib";;
346
348
copy_rule' "otherlibs/dynlink/extract_crc.byte" "otherlibs/dynlink/extract_crc";;
 
349
copy_rule' "myocamlbuild_config.mli" "ocamlbuild/ocamlbuild_Myocamlbuild_config.mli";;
 
350
copy_rule' "myocamlbuild_config.ml" "ocamlbuild/ocamlbuild_Myocamlbuild_config.ml";;
347
351
 
348
352
copy_rule' ~insert:`bottom "%" "%.exe";;
349
353
 
396
400
copy_rule' ~insert:`top "otherlibs/dynlink/natdynlink.ml" "otherlibs/dynlink/nat/dynlink.ml";;
397
401
copy_rule' ~insert:`top "otherlibs/dynlink/dynlink.mli" "otherlibs/dynlink/nat/dynlink.mli";;
398
402
copy_rule' ~insert:`top "otherlibs/dynlink/nat/dynlink.cmx" "otherlibs/dynlink/dynlink.cmx";;
 
403
copy_rule' ~insert:`top ("otherlibs/dynlink/nat/dynlink"-.-C.o) ("otherlibs/dynlink/dynlink"-.-C.o);;
399
404
copy_rule' ~insert:`top "otherlibs/dynlink/nat/dynlink.cmxa" "otherlibs/dynlink/dynlink.cmxa";;
400
405
copy_rule' ~insert:`top ("otherlibs/dynlink/nat/dynlink"-.-C.a) ("otherlibs/dynlink/dynlink"-.-C.a);;
401
406
dep ["ocaml"; "compile"; "native"; "file:otherlibs/dynlink/nat/dynlink.cmx"] ["otherlibs/dynlink/nat/dynlink.cmi"];;
1068
1073
 @  "tk"
1069
1074
 :: labltk_generated_modules
1070
1075
 @  "cTk"
1071
 
 :: camltk_generated_modules;;
 
1076
 :: camltk_generated_modules
 
1077
 @  ["labltk"; "camltk"];;
1072
1078
 
1073
1079
let labltk_contents obj_ext =
1074
1080
    List.map (fun x -> "otherlibs/labltk/support"/x-.-obj_ext) labltk_support
1075
1081
 @  "otherlibs/labltk/labltk/tk"-.-obj_ext
1076
1082
 :: List.map (fun x -> "otherlibs/labltk/labltk"/x-.-obj_ext) labltk_generated_modules
1077
1083
 @  "otherlibs/labltk/camltk/cTk"-.-obj_ext
1078
 
 :: List.map (fun x -> "otherlibs/labltk/camltk"/x-.-obj_ext) camltk_generated_modules;;
 
1084
 :: List.map (fun x -> "otherlibs/labltk/camltk"/x-.-obj_ext) camltk_generated_modules
 
1085
 @  ["otherlibs/labltk/labltk/labltk"-.-obj_ext;
 
1086
     "otherlibs/labltk/camltk/camltk"-.-obj_ext]
 
1087
;;
1079
1088
 
1080
1089
let labltk_cma_contents = labltk_contents "cmo" in
1081
1090
rule "labltk.cma"
1086
1095
 
1087
1096
let labltk_cmxa_contents = labltk_contents "cmx" in
1088
1097
rule "labltk.cmxa"
1089
 
  ~prod:"otherlibs/labltk/lib/labltk.cmxa"
 
1098
  ~prods:["otherlibs/labltk/lib/labltk.cmxa"; "otherlibs/labltk/lib/labltk"-.-C.a]
1090
1099
  ~deps:labltk_cmxa_contents
1091
1100
  (Ocamlbuild_pack.Ocaml_compiler.native_library_link_modules
1092
1101
      labltk_lib_contents "otherlibs/labltk/lib/labltk.cmxa");;