Skip to content

Commit

Permalink
Merge pull request mirage#191 from djs55/unix-optional
Browse files Browse the repository at this point in the history
Make the unix sub packages optional
  • Loading branch information
avsm committed Mar 20, 2016
2 parents 0afcb57 + 0b148f7 commit 298b86e
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 14 deletions.
13 changes: 13 additions & 0 deletions _oasis
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ Flag xen
Description: Build Xen support
Default: false

Flag unix
Description: Build Unix support
Default: true

Library tcpip
CompiledObject: best
Path: lib
Expand Down Expand Up @@ -125,6 +129,7 @@ Library "tcpip-stack-direct"
tcpip.dhcpv4

Library "ethif-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand All @@ -136,6 +141,7 @@ Library "ethif-unix"
lwt.unix

Library "arpv4-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand All @@ -147,6 +153,7 @@ Library "arpv4-unix"
lwt.unix

Library "ipv4-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand All @@ -158,6 +165,7 @@ Library "ipv4-unix"
lwt.unix

Library "ipv6-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand All @@ -169,6 +177,7 @@ Library "ipv6-unix"
lwt.unix

Library "udpv4-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand All @@ -183,6 +192,7 @@ Library "udpv4-unix"
io-page.unix

Library "udpv6-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand Down Expand Up @@ -223,6 +233,7 @@ Library "udpv6-socket"
io-page.unix

Library "tcpv4-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand All @@ -240,6 +251,7 @@ Library "tcpv4-unix"
io-page.unix

Library "tcpv6-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand Down Expand Up @@ -281,6 +293,7 @@ Library "tcpv6-socket"
io-page.unix

Library "tcpip-stack-unix"
Build$: flag(unix)
CompiledObject: best
Path: unix
Findlibparent: tcpip
Expand Down
10 changes: 8 additions & 2 deletions opam
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ license: "ISC"
tags: ["org:mirage"]

build: [
["./configure" "--prefix" prefix "--%{mirage-xen:enable}%-xen"]
["./configure" "--prefix" prefix
"--%{mirage-xen:enable}%-xen"
"--%{mirage-net-unix:enable}%-unix"
]
[make]
]
build-test: [
Expand All @@ -47,7 +50,6 @@ depends: [
"mirage-unix" {>= "1.1.0"}
"mirage-console"
"mirage-clock-unix" {>= "1.0.0"}
"mirage-net-unix" {>= "1.1.0"}
"ipaddr" {>= "2.2.0"}
"mirage-profile" {>= "0.5"}
"mirage-flow" {test}
Expand All @@ -58,5 +60,9 @@ depends: [
]
depopts: [
"mirage-xen"
"mirage-net-unix"
]
conflicts: [
"mirage-net-unix" { < "1.1.0" }
]
available: [ocaml-version >= "4.01.0"]
70 changes: 58 additions & 12 deletions setup.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(* setup.ml generated for the first time by OASIS v0.4.5 *)

(* OASIS_START *)
(* DO NOT EDIT (digest: 4d4812ef99aa0612194432681173cd76) *)
(* DO NOT EDIT (digest: e0c2680911b1e1f4ed5f1abcc58cdd73) *)
(*
Regenerated by OASIS v0.4.5
Visit http://oasis.forge.ocamlcore.org for more information and
Expand Down Expand Up @@ -6926,6 +6926,16 @@ let setup_t =
flag_description = Some "Build Xen support";
flag_default = [(OASISExpr.EBool true, false)]
});
Flag
({
cs_name = "unix";
cs_data = PropList.Data.create ();
cs_plugin_data = []
},
{
flag_description = Some "Build Unix support";
flag_default = [(OASISExpr.EBool true, true)]
});
Library
({
cs_name = "tcpip";
Expand Down Expand Up @@ -7343,7 +7353,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7379,7 +7393,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7415,7 +7433,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7451,7 +7473,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7487,7 +7513,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7526,7 +7556,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7641,7 +7675,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7683,7 +7721,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7799,7 +7841,11 @@ let setup_t =
cs_plugin_data = []
},
{
bs_build = [(OASISExpr.EBool true, true)];
bs_build =
[
(OASISExpr.EBool true, false);
(OASISExpr.EFlag "unix", true)
];
bs_install = [(OASISExpr.EBool true, true)];
bs_path = "unix";
bs_compiled_object = Best;
Expand Down Expand Up @@ -7956,14 +8002,14 @@ let setup_t =
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.5";
oasis_digest = Some "\152\001QçÂ\030MC¥\153VÂTIqÔ";
oasis_digest = Some "·ÖÇä®ñ\158¿Ã8\154w\155½­;";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
};;

let setup () = BaseSetup.setup setup_t;;

# 7968 "setup.ml"
# 8014 "setup.ml"
(* OASIS_STOP *)
let () = setup ();;

0 comments on commit 298b86e

Please sign in to comment.