Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 2 contributors
Commits on Mar 09, 2012
@superbobry superbobry Added two flags allowing *NOT* to build tests and apps
  Note: `tests` flag seems to be defined by default in OASIS 0.3rc2
00622d4
Commits on Mar 10, 2012
@pveber Merge pull request #13 from superbobry/master
Added flags for *NOT* building tests and apps
d09b952
Showing with 1,513 additions and 1,316 deletions.
  1. +12 −3 _oasis
  2. +41 −28 _tags
  3. +21 −2 configure
  4. +42 −37 myocamlbuild.ml
  5. +1,397 −1,246 setup.ml
View
15 _oasis
@@ -8,6 +8,10 @@ License: LGPL with OCaml linking exception
Plugins: META (0.2), DevFiles (0.2)
BuildTools: ocamlbuild
+Flag apps
+ Description: Build apps
+ Default: false
+
Library biocamlxmlm
Path: src/ext/xmlm-1.0.2/src
FindlibName: biocamlxmlm
@@ -62,30 +66,35 @@ Library biocaml
Executable gff_counts
Path: src/app
MainIs: gff_counts.ml
+ Build$: flag(apps)
BuildDepends: getopt, biocaml
CompiledObject: best
Executable gff_to_bed
Path: src/app
MainIs: gff_to_bed.ml
+ Build$: flag(apps)
BuildDepends: getopt, biocaml
CompiledObject: best
Executable gff_to_table
Path: src/app
MainIs: gff_to_table.ml
+ Build$: flag(apps)
BuildDepends: getopt, biocaml
CompiledObject: best
Executable sgr_to_wig
Path: src/app
MainIs: sgr_to_wig.ml
+ Build$: flag(apps)
BuildDepends: getopt, biocaml
CompiledObject: best
Executable wig_correlate
Path: src/app
MainIs: wig_correlate.ml
+ Build$: flag(apps)
BuildDepends: getopt, biocaml
CompiledObject: best
@@ -99,12 +108,12 @@ Document doclib
XOCamlbuildLibraries: biocaml
Executable test
- Path: src/tests
+ Path: src/tests
MainIs: main.ml
Install: false
CompiledObject: native
+ Build$: flag(tests)
BuildDepends: threads, unix, oUnit (>= 1.1.0), batteries, biocaml
-
+
Test main
Command: $test
-
View
69 _tags
@@ -1,5 +1,18 @@
# OASIS_START
-# DO NOT EDIT (digest: 43db134dc5cd464edcd61e1ff87f2b18)
+# DO NOT EDIT (digest: c8ef714fef7a3d482072655aa6e466f2)
+# 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
+<**/.svn>: -traverse
+<**/.svn>: not_hygienic
+".bzr": -traverse
+".bzr": not_hygienic
+".hg": -traverse
+".hg": not_hygienic
+".git": -traverse
+".git": not_hygienic
+"_darcs": -traverse
+"_darcs": not_hygienic
# Library biocamlxmlm
"src/ext/xmlm-1.0.2/src": include
# Library biocaml
@@ -19,15 +32,24 @@
"src/lib/biocaml_pwm_stub.c": pkg_sqlite3
"src/lib/biocaml_pwm_stub.c": pkg_pcre
"src/lib/biocaml_pwm_stub.c": pkg_batteries
-# Executable gff_to_bed
-<src/app/gff_to_bed.{native,byte}>: use_biocaml
-<src/app/gff_to_bed.{native,byte}>: use_biocamlxmlm
-<src/app/gff_to_bed.{native,byte}>: pkg_unix
-<src/app/gff_to_bed.{native,byte}>: pkg_threads
-<src/app/gff_to_bed.{native,byte}>: pkg_sqlite3
-<src/app/gff_to_bed.{native,byte}>: pkg_pcre
-<src/app/gff_to_bed.{native,byte}>: pkg_getopt
-<src/app/gff_to_bed.{native,byte}>: pkg_batteries
+# Executable gff_to_table
+<src/app/gff_to_table.{native,byte}>: use_biocaml
+<src/app/gff_to_table.{native,byte}>: use_biocamlxmlm
+<src/app/gff_to_table.{native,byte}>: pkg_unix
+<src/app/gff_to_table.{native,byte}>: pkg_threads
+<src/app/gff_to_table.{native,byte}>: pkg_sqlite3
+<src/app/gff_to_table.{native,byte}>: pkg_pcre
+<src/app/gff_to_table.{native,byte}>: pkg_getopt
+<src/app/gff_to_table.{native,byte}>: pkg_batteries
+# Executable sgr_to_wig
+<src/app/sgr_to_wig.{native,byte}>: use_biocaml
+<src/app/sgr_to_wig.{native,byte}>: use_biocamlxmlm
+<src/app/sgr_to_wig.{native,byte}>: pkg_unix
+<src/app/sgr_to_wig.{native,byte}>: pkg_threads
+<src/app/sgr_to_wig.{native,byte}>: pkg_sqlite3
+<src/app/sgr_to_wig.{native,byte}>: pkg_pcre
+<src/app/sgr_to_wig.{native,byte}>: pkg_getopt
+<src/app/sgr_to_wig.{native,byte}>: pkg_batteries
# Executable gff_counts
<src/app/gff_counts.{native,byte}>: use_biocaml
<src/app/gff_counts.{native,byte}>: use_biocamlxmlm
@@ -63,24 +85,15 @@
<src/tests/*.ml{,i}>: pkg_pcre
<src/tests/*.ml{,i}>: pkg_oUnit
<src/tests/*.ml{,i}>: pkg_batteries
-# Executable gff_to_table
-<src/app/gff_to_table.{native,byte}>: use_biocaml
-<src/app/gff_to_table.{native,byte}>: use_biocamlxmlm
-<src/app/gff_to_table.{native,byte}>: pkg_unix
-<src/app/gff_to_table.{native,byte}>: pkg_threads
-<src/app/gff_to_table.{native,byte}>: pkg_sqlite3
-<src/app/gff_to_table.{native,byte}>: pkg_pcre
-<src/app/gff_to_table.{native,byte}>: pkg_getopt
-<src/app/gff_to_table.{native,byte}>: pkg_batteries
-# Executable sgr_to_wig
-<src/app/sgr_to_wig.{native,byte}>: use_biocaml
-<src/app/sgr_to_wig.{native,byte}>: use_biocamlxmlm
-<src/app/sgr_to_wig.{native,byte}>: pkg_unix
-<src/app/sgr_to_wig.{native,byte}>: pkg_threads
-<src/app/sgr_to_wig.{native,byte}>: pkg_sqlite3
-<src/app/sgr_to_wig.{native,byte}>: pkg_pcre
-<src/app/sgr_to_wig.{native,byte}>: pkg_getopt
-<src/app/sgr_to_wig.{native,byte}>: pkg_batteries
+# Executable gff_to_bed
+<src/app/gff_to_bed.{native,byte}>: use_biocaml
+<src/app/gff_to_bed.{native,byte}>: use_biocamlxmlm
+<src/app/gff_to_bed.{native,byte}>: pkg_unix
+<src/app/gff_to_bed.{native,byte}>: pkg_threads
+<src/app/gff_to_bed.{native,byte}>: pkg_sqlite3
+<src/app/gff_to_bed.{native,byte}>: pkg_pcre
+<src/app/gff_to_bed.{native,byte}>: pkg_getopt
+<src/app/gff_to_bed.{native,byte}>: pkg_batteries
<src/app/*.ml{,i}>: use_biocaml
<src/app/*.ml{,i}>: use_biocamlxmlm
<src/app/*.ml{,i}>: pkg_unix
View
23 configure
@@ -1,8 +1,27 @@
#!/bin/sh
# OASIS_START
-# DO NOT EDIT (digest: ed33e59fe00e48bc31edf413bbc8b8d6)
+# DO NOT EDIT (digest: 425187ed8bfdbdd207fd76392dd243a7)
set -e
-ocaml setup.ml -configure $*
+FST=true
+for i in "$@"; do
+ if $FST; then
+ set --
+ FST=false
+ fi
+
+ case $i in
+ --*=*)
+ ARG=${i%%=*}
+ VAL=${i##*=}
+ set -- "$@" "$ARG" "$VAL"
+ ;;
+ *)
+ set -- "$@" "$i"
+ ;;
+ esac
+done
+
+ocaml setup.ml -configure "$@"
# OASIS_STOP
View
79 myocamlbuild.ml
@@ -1,12 +1,12 @@
(* OASIS_START *)
-(* DO NOT EDIT (digest: 53fe92dea47eec1c1ae1ee7e2e42b231) *)
+(* DO NOT EDIT (digest: 6c8acc38528f3009cc1505f2f6ef2045) *)
module OASISGettext = struct
-# 21 "/tmp/buildd/oasis-0.2.0/src/oasis/OASISGettext.ml"
+# 21 "/home/bobry/Code/playground/pkgbuilds/ocaml-oasis/src/oasis-0.3.0~rc2/src/oasis/OASISGettext.ml"
- let ns_ str =
+ let ns_ str =
str
- let s_ str =
+ let s_ str =
str
let f_ (str : ('a, 'b, 'c, 'd) format4) =
@@ -18,13 +18,13 @@ module OASISGettext = struct
else
fmt2^^""
- let init =
+ let init =
[]
end
module OASISExpr = struct
-# 21 "/tmp/buildd/oasis-0.2.0/src/oasis/OASISExpr.ml"
+# 21 "/home/bobry/Code/playground/pkgbuilds/ocaml-oasis/src/oasis-0.3.0~rc2/src/oasis/OASISExpr.ml"
@@ -46,18 +46,18 @@ module OASISExpr = struct
type 'a choices = (t * 'a) list
let eval var_get t =
- let rec eval' =
+ let rec eval' =
function
| EBool b ->
b
- | ENot e ->
+ | ENot e ->
not (eval' e)
| EAnd (e1, e2) ->
(eval' e1) && (eval' e2)
- | EOr (e1, e2) ->
+ | EOr (e1, e2) ->
(eval' e1) || (eval' e2)
| EFlag nm ->
@@ -76,19 +76,19 @@ module OASISExpr = struct
eval' t
let choose ?printer ?name var_get lst =
- let rec choose_aux =
+ let rec choose_aux =
function
| (cond, vl) :: tl ->
- if eval var_get cond then
- vl
+ if eval var_get cond then
+ vl
else
choose_aux tl
| [] ->
- let str_lst =
+ let str_lst =
if lst = [] then
s_ "<empty>"
else
- String.concat
+ String.concat
(s_ ", ")
(List.map
(fun (cond, vl) ->
@@ -97,10 +97,10 @@ module OASISExpr = struct
| None -> s_ "<no printer>")
lst)
in
- match name with
+ match name with
| Some nm ->
failwith
- (Printf.sprintf
+ (Printf.sprintf
(f_ "No result for the choice list '%s': %s")
nm str_lst)
| None ->
@@ -115,14 +115,14 @@ end
module BaseEnvLight = struct
-# 21 "/tmp/buildd/oasis-0.2.0/src/base/BaseEnvLight.ml"
+# 21 "/home/bobry/Code/playground/pkgbuilds/ocaml-oasis/src/oasis-0.3.0~rc2/src/base/BaseEnvLight.ml"
module MapString = Map.Make(String)
type t = string MapString.t
let default_filename =
- Filename.concat
+ Filename.concat
(Sys.getcwd ())
"setup.data"
@@ -138,23 +138,23 @@ module BaseEnvLight = struct
let line =
ref 1
in
- let st_line =
+ let st_line =
Stream.from
(fun _ ->
try
- match Stream.next st with
+ match Stream.next st with
| '\n' -> incr line; Some '\n'
| c -> Some c
with Stream.Failure -> None)
in
- let lexer =
+ let lexer =
Genlex.make_lexer ["="] st_line
in
let rec read_file mp =
- match Stream.npeek 3 lexer with
+ match Stream.npeek 3 lexer with
| [Genlex.Ident nm; Genlex.Kwd "="; Genlex.String value] ->
- Stream.junk lexer;
- Stream.junk lexer;
+ Stream.junk lexer;
+ Stream.junk lexer;
Stream.junk lexer;
read_file (MapString.add nm value mp)
| [] ->
@@ -177,8 +177,8 @@ module BaseEnvLight = struct
end
else
begin
- failwith
- (Printf.sprintf
+ failwith
+ (Printf.sprintf
"Unable to load environment, the file '%s' doesn't exist."
filename)
end
@@ -188,23 +188,23 @@ module BaseEnvLight = struct
let buff =
Buffer.create ((String.length str) * 2)
in
- Buffer.add_substitute
+ Buffer.add_substitute
buff
- (fun var ->
- try
+ (fun var ->
+ try
var_expand (MapString.find var env)
with Not_found ->
- failwith
- (Printf.sprintf
+ failwith
+ (Printf.sprintf
"No variable %s defined when trying to expand %S."
- var
+ var
str))
str;
Buffer.contents buff
in
var_expand (MapString.find name env)
- let var_choose lst env =
+ let var_choose lst env =
OASISExpr.choose
(fun nm -> var_get nm env)
lst
@@ -212,7 +212,7 @@ end
module MyOCamlbuildFindlib = struct
-# 21 "/tmp/buildd/oasis-0.2.0/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml"
+# 21 "/home/bobry/Code/playground/pkgbuilds/ocaml-oasis/src/oasis-0.3.0~rc2/src/plugins/ocamlbuild/MyOCamlbuildFindlib.ml"
(** OCamlbuild extension, copied from
* http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild
@@ -311,6 +311,7 @@ module MyOCamlbuildFindlib = struct
* the "threads" package using the previous plugin.
*)
flag ["ocaml"; "pkg_threads"; "compile"] (S[A "-thread"]);
+ flag ["ocaml"; "pkg_threads"; "doc"] (S[A "-I"; A "+threads"]);
flag ["ocaml"; "pkg_threads"; "link"] (S[A "-thread"]);
flag ["ocaml"; "pkg_threads"; "infer_interface"] (S[A "-thread"])
@@ -320,7 +321,7 @@ module MyOCamlbuildFindlib = struct
end
module MyOCamlbuildBase = struct
-# 21 "/tmp/buildd/oasis-0.2.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
+# 21 "/home/bobry/Code/playground/pkgbuilds/ocaml-oasis/src/oasis-0.3.0~rc2/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
(** Base functions for writing myocamlbuild.ml
@author Sylvain Le Gall
@@ -335,7 +336,7 @@ module MyOCamlbuildBase = struct
type name = string
type tag = string
-# 55 "/tmp/buildd/oasis-0.2.0/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
+# 55 "/home/bobry/Code/playground/pkgbuilds/ocaml-oasis/src/oasis-0.3.0~rc2/src/plugins/ocamlbuild/MyOCamlbuildBase.ml"
type t =
{
@@ -413,7 +414,10 @@ 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"; "use_lib"^lib]
+ dep ["link"; "ocaml"; "program"; "use_lib"^lib]
+ [dir/"lib"^lib^"."^(!Options.ext_lib)];
+
+ dep ["compile"; "ocaml"; "program"; "use_lib"^lib]
[dir/"lib"^lib^"."^(!Options.ext_lib)];
(* TODO: be more specific about what depends on headers *)
@@ -467,5 +471,6 @@ let package_default =
let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
+# 475 "myocamlbuild.ml"
(* OASIS_STOP *)
Ocamlbuild_plugin.dispatch dispatch_default;;
View
2,643 setup.ml
1,397 additions, 1,246 deletions not shown

No commit comments for this range

Something went wrong with that request. Please try again.