Skip to content

Commit 6facf76

Browse files
committed
Added support for conditional building of examples
1 parent 92c2284 commit 6facf76

File tree

2 files changed

+52
-10
lines changed

2 files changed

+52
-10
lines changed

_oasis

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,38 @@ Library postgresql
4040

4141
# Examples
4242

43+
Flag examples
44+
Description: Build examples
45+
Default: true
46+
4347
Executable cursor
4448
Path: examples
4549
MainIs: cursor.ml
50+
Build$: flag(examples)
4651
BuildDepends: postgresql
4752
Install: false
4853
CompiledObject: best
4954

5055
Executable dump
5156
Path: examples
5257
MainIs: dump.ml
58+
Build$: flag(examples)
5359
BuildDepends: postgresql
5460
Install: false
5561
CompiledObject: best
5662

5763
Executable populate
5864
Path: examples
5965
MainIs: populate.ml
66+
Build$: flag(examples)
6067
BuildDepends: postgresql
6168
Install: false
6269
CompiledObject: best
6370

6471
Executable prompt
6572
Path: examples
6673
MainIs: prompt.ml
74+
Build$: flag(examples)
6775
BuildDepends: postgresql
6876
Install: false
6977
CompiledObject: best
@@ -75,14 +83,15 @@ Flag lablgtk2
7583
Executable prompt_gtk
7684
Path: examples
7785
MainIs: prompt_gtk.ml
78-
Build$: flag(lablgtk2)
86+
Build$: flag(examples) && flag(lablgtk2)
7987
BuildDepends: postgresql, lablgtk2
8088
Install: false
8189
CompiledObject: best
8290

8391
Executable test_lo
8492
Path: examples
8593
MainIs: test_lo.ml
94+
Build$: flag(examples)
8695
BuildDepends: postgresql
8796
Install: false
8897
CompiledObject: best

setup.ml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* setup.ml generated for the first time by OASIS v0.3.0 *)
22

33
(* OASIS_START *)
4-
(* DO NOT EDIT (digest: 698133cd5beb2ac5bf7d610ab553ce08) *)
4+
(* DO NOT EDIT (digest: 8219a3d24b5430546ae8fb54df36c8e4) *)
55
(*
66
Regenerated by OASIS v0.3.0
77
Visit http://oasis.forge.ocamlcore.org for more information and
@@ -5708,14 +5708,28 @@ let setup_t =
57085708
lib_findlib_name = Some "postgresql";
57095709
lib_findlib_containers = [];
57105710
});
5711+
Flag
5712+
({
5713+
cs_name = "examples";
5714+
cs_data = PropList.Data.create ();
5715+
cs_plugin_data = [];
5716+
},
5717+
{
5718+
flag_description = Some "Build examples";
5719+
flag_default = [(OASISExpr.EBool true, true)];
5720+
});
57115721
Executable
57125722
({
57135723
cs_name = "cursor";
57145724
cs_data = PropList.Data.create ();
57155725
cs_plugin_data = [];
57165726
},
57175727
{
5718-
bs_build = [(OASISExpr.EBool true, true)];
5728+
bs_build =
5729+
[
5730+
(OASISExpr.EBool true, false);
5731+
(OASISExpr.EFlag "examples", true)
5732+
];
57195733
bs_install = [(OASISExpr.EBool true, false)];
57205734
bs_path = "examples";
57215735
bs_compiled_object = Best;
@@ -5739,7 +5753,11 @@ let setup_t =
57395753
cs_plugin_data = [];
57405754
},
57415755
{
5742-
bs_build = [(OASISExpr.EBool true, true)];
5756+
bs_build =
5757+
[
5758+
(OASISExpr.EBool true, false);
5759+
(OASISExpr.EFlag "examples", true)
5760+
];
57435761
bs_install = [(OASISExpr.EBool true, false)];
57445762
bs_path = "examples";
57455763
bs_compiled_object = Best;
@@ -5763,7 +5781,11 @@ let setup_t =
57635781
cs_plugin_data = [];
57645782
},
57655783
{
5766-
bs_build = [(OASISExpr.EBool true, true)];
5784+
bs_build =
5785+
[
5786+
(OASISExpr.EBool true, false);
5787+
(OASISExpr.EFlag "examples", true)
5788+
];
57675789
bs_install = [(OASISExpr.EBool true, false)];
57685790
bs_path = "examples";
57695791
bs_compiled_object = Best;
@@ -5787,7 +5809,11 @@ let setup_t =
57875809
cs_plugin_data = [];
57885810
},
57895811
{
5790-
bs_build = [(OASISExpr.EBool true, true)];
5812+
bs_build =
5813+
[
5814+
(OASISExpr.EBool true, false);
5815+
(OASISExpr.EFlag "examples", true)
5816+
];
57915817
bs_install = [(OASISExpr.EBool true, false)];
57925818
bs_path = "examples";
57935819
bs_compiled_object = Best;
@@ -5825,7 +5851,10 @@ let setup_t =
58255851
bs_build =
58265852
[
58275853
(OASISExpr.EBool true, false);
5828-
(OASISExpr.EFlag "lablgtk2", true)
5854+
(OASISExpr.EAnd
5855+
(OASISExpr.EFlag "examples",
5856+
OASISExpr.EFlag "lablgtk2"),
5857+
true)
58295858
];
58305859
bs_install = [(OASISExpr.EBool true, false)];
58315860
bs_path = "examples";
@@ -5854,7 +5883,11 @@ let setup_t =
58545883
cs_plugin_data = [];
58555884
},
58565885
{
5857-
bs_build = [(OASISExpr.EBool true, true)];
5886+
bs_build =
5887+
[
5888+
(OASISExpr.EBool true, false);
5889+
(OASISExpr.EFlag "examples", true)
5890+
];
58585891
bs_install = [(OASISExpr.EBool true, false)];
58595892
bs_path = "examples";
58605893
bs_compiled_object = Best;
@@ -5928,14 +5961,14 @@ let setup_t =
59285961
};
59295962
oasis_fn = Some "_oasis";
59305963
oasis_version = "0.3.0";
5931-
oasis_digest = Some "Õ\006ÝãØViË\128\028bÛYEY\129";
5964+
oasis_digest = Some "x8\003[{ÈV.gG\017ÑùýÞL";
59325965
oasis_exec = None;
59335966
oasis_setup_args = [];
59345967
setup_update = false;
59355968
};;
59365969

59375970
let setup () = BaseSetup.setup setup_t;;
59385971

5939-
# 5940 "setup.ml"
5972+
# 5973 "setup.ml"
59405973
(* OASIS_STOP *)
59415974
let () = setup ();;

0 commit comments

Comments
 (0)