Skip to content

Commit

Permalink
Switching to Tyxml
Browse files Browse the repository at this point in the history
Ignore-this: ef50f4816c32d2c9876db2e7186417c9

darcs-hash:20121204141832-a85e5-d615f51db5f04cef72a53cfcfb00815f9aa614fa
  • Loading branch information
kit-ty-kate committed Dec 4, 2012
1 parent 2165164 commit 778cf30
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 125 deletions.
4 changes: 2 additions & 2 deletions INSTALL.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(* OASIS_START *)
(* DO NOT EDIT (digest: 9fbd9b7bc8431a8c3dd4c4c7d78d2ae2) *)
(* DO NOT EDIT (digest: 0285bf40fba5c66740b69a483c4c7639) *)
This is the INSTALL file for the ocaml-markdown distribution.

This package uses OASIS to generate its build system. See section OASIS for
Expand All @@ -13,7 +13,7 @@ In order to compile this package, you will need:
* findlib
* extlib for library markdown
* sexplib for library markdown
* ocsigen for library html
* tyxml for library html
* oUnit for executable test

Installing
Expand Down
2 changes: 1 addition & 1 deletion _oasis
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Library html
FindlibParent: markdown
Path: src
Modules: MarkdownHTML
BuildDepends: markdown, ocsigen.xhtml
BuildDepends: markdown, tyxml

Executable test
Path: test
Expand Down
4 changes: 2 additions & 2 deletions _tags
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# OASIS_START
# DO NOT EDIT (digest: 0a8c8eb757c302fb5a7cb238d5eab46f)
# DO NOT EDIT (digest: d18ebce4c7b3e9563cb1c3a17a4c17a1)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
Expand All @@ -18,7 +18,7 @@
# Library html
"src/html.cmxs": use_html
<src/*.ml{,i}>: use_markdown
<src/*.ml{,i}>: pkg_ocsigen.xhtml
<src/*.ml{,i}>: pkg_tyxml
<src/*.ml{,i}>: pkg_extlib
<src/*.ml{,i}>: pkg_str
<src/*.ml{,i}>: pkg_sexplib
Expand Down
80 changes: 4 additions & 76 deletions myocamlbuild.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(* OASIS_START *)
(* DO NOT EDIT (digest: bd0a35d317b032145f79323ccc9bafbe) *)
(* DO NOT EDIT (digest: b7866fc0436f28cefd6108090c088712) *)
module OASISGettext = struct
# 21 "/home/gildor/programmation/oasis/src/oasis/OASISGettext.ml"

Expand Down Expand Up @@ -395,78 +395,6 @@ module MyOCamlbuildBase = struct
Options.ext_dll, "ext_dll";
]

| Before_rules ->
(* TODO: move this into its own file and conditionnaly include it, if
* needed.
*)
(* OCaml cmxs rules: cmxs available in ocamlopt but not ocamlbuild.
Copied from ocaml_specific.ml in ocamlbuild sources. *)
let has_native_dynlink =
try
bool_of_string (BaseEnvLight.var_get "native_dynlink" env)
with Not_found ->
false
in
if has_native_dynlink && String.sub Sys.ocaml_version 0 4 = "3.11" then
begin
let ext_lib = !Options.ext_lib in
let ext_obj = !Options.ext_obj in
let ext_dll = !Options.ext_dll in
let x_o = "%"-.-ext_obj in
let x_a = "%"-.-ext_lib in
let x_dll = "%"-.-ext_dll in
let x_p_o = "%.p"-.-ext_obj in
let x_p_a = "%.p"-.-ext_lib in
let x_p_dll = "%.p"-.-ext_dll in

rule "ocaml: mldylib & p.cmx* & p.o* -> p.cmxs & p.so"
~tags:["ocaml"; "native"; "profile"; "shared"; "library"]
~prods:["%.p.cmxs"; x_p_dll]
~dep:"%.mldylib"
(OC.native_profile_shared_library_link_mldylib
"%.mldylib" "%.p.cmxs");

rule "ocaml: mldylib & cmx* & o* -> cmxs & so"
~tags:["ocaml"; "native"; "shared"; "library"]
~prods:["%.cmxs"; x_dll]
~dep:"%.mldylib"
(OC.native_shared_library_link_mldylib
"%.mldylib" "%.cmxs");

rule "ocaml: p.cmx & p.o -> p.cmxs & p.so"
~tags:["ocaml"; "native"; "profile"; "shared"; "library"]
~prods:["%.p.cmxs"; x_p_dll]
~deps:["%.p.cmx"; x_p_o]
(OC.native_shared_library_link ~tags:["profile"]
"%.p.cmx" "%.p.cmxs");

rule "ocaml: p.cmxa & p.a -> p.cmxs & p.so"
~tags:["ocaml"; "native"; "profile"; "shared"; "library"]
~prods:["%.p.cmxs"; x_p_dll]
~deps:["%.p.cmxa"; x_p_a]
(OC.native_shared_library_link ~tags:["profile"; "linkall"]
"%.p.cmxa" "%.p.cmxs");

rule "ocaml: cmx & o -> cmxs"
~tags:["ocaml"; "native"; "shared"; "library"]
~prods:["%.cmxs"]
~deps:["%.cmx"; x_o]
(OC.native_shared_library_link "%.cmx" "%.cmxs");

rule "ocaml: cmx & o -> cmxs & so"
~tags:["ocaml"; "native"; "shared"; "library"]
~prods:["%.cmxs"; x_dll]
~deps:["%.cmx"; x_o]
(OC.native_shared_library_link "%.cmx" "%.cmxs");

rule "ocaml: cmxa & a -> cmxs & so"
~tags:["ocaml"; "native"; "shared"; "library"]
~prods:["%.cmxs"; x_dll]
~deps:["%.cmxa"; x_a]
(OC.native_shared_library_link ~tags:["linkall"]
"%.cmxa" "%.cmxs");
end

| After_rules ->
(* Declare OCaml libraries *)
List.iter
Expand Down Expand Up @@ -507,7 +435,7 @@ module MyOCamlbuildBase = struct
(* When ocaml link something that use the C library, then one
need that file to be up to date.
*)
dep ["link"; "ocaml"; "program"; tag_libstubs lib]
dep ["link"; "ocaml"; "program"; tag_libstubs lib]
[dir/"lib"^(nm_libstubs lib)^"."^(!Options.ext_lib)];

dep ["compile"; "ocaml"; "program"; tag_libstubs lib]
Expand Down Expand Up @@ -545,7 +473,7 @@ module MyOCamlbuildBase = struct
end


# 548 "myocamlbuild.ml"
# 476 "myocamlbuild.ml"
open Ocamlbuild_plugin;;
let package_default =
{
Expand All @@ -558,6 +486,6 @@ let package_default =

let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;

# 562 "myocamlbuild.ml"
# 490 "myocamlbuild.ml"
(* OASIS_STOP *)
Ocamlbuild_plugin.dispatch dispatch_default;;
Loading

0 comments on commit 778cf30

Please sign in to comment.