projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Tom's Grammar work to the build script. Requires libGrammar.a
[SXSI/xpathcomp.git]
/
build
diff --git
a/build
b/build
index
e3839ed
..
9b62f74
100755
(executable)
--- a/
build
+++ b/
build
@@
-1,28
+1,31
@@
#!/usr/bin/env ocaml
#use "myocamlbuild_config.ml"
#!/usr/bin/env ocaml
#use "myocamlbuild_config.ml"
-let valid_targets = [ "distclean"; "clean"; "all" ]
+let valid_targets = [ "distclean"; "clean"; "all" ]
module Cmdline =
struct
open Arg
let set r s () = r := s
module Cmdline =
struct
open Arg
let set r s () = r := s
+ let cons r s () = r := s :: !r
let targets = ref []
let targets = ref []
+ let tags = ref []
let flavor = ref "native"
let flavor = ref "native"
- let debug = ref ""
- let profile = ref ""
let verbose = ref ""
let jobs = ref 0
let specs = align
let verbose = ref ""
let jobs = ref 0
let specs = align
- [ "-verbose", Unit (set verbose "-classic-display"),
+ [ "-verbose", Unit (set verbose "-
verbose 10 -
classic-display"),
" Display compilation commands";
" Display compilation commands";
- "-debug", Unit (
set debug
"-tag debug"),
+ "-debug", Unit (
cons tags
"-tag debug"),
" Build with debugging code";
" Build with debugging code";
- "-profile", Unit (
set profile
"-tag profile"),
+ "-profile", Unit (
cons tags
"-tag profile"),
" Build with profiling code";
" Build with profiling code";
+ "-trace", Unit (cons tags "-tag trace"),
+ " Build with tracing code enabled";
+
"-byte", Unit (set flavor "byte"),
" Produce bytecode instead of native code";
"-j", Int (fun i -> if i < 0 || i > 1024
"-byte", Unit (set flavor "byte"),
" Produce bytecode instead of native code";
"-j", Int (fun i -> if i < 0 || i > 1024
@@
-53,11
+56,11
@@
let tests_targets = []
let () = Cmdline.parse ()
let cmd_list =
let ocamlbuild =
let () = Cmdline.parse ()
let cmd_list =
let ocamlbuild =
- Printf.sprintf "ocamlbuild %s %s
%s
-j %i "
- !Cmdline.verbose
!Cmdline.profile !Cmdline.debug
!Cmdline.jobs
+ Printf.sprintf "ocamlbuild %s %s -j %i "
+ !Cmdline.verbose
(String.concat " " !Cmdline.tags)
!Cmdline.jobs
in
List.map begin function
in
List.map begin function
- | "distclean" -> "rm myocamlbuild_config.ml; ocamlbuild -clean"
+ | "distclean" -> "rm
-f
myocamlbuild_config.ml; ocamlbuild -clean"
| "clean" -> "ocamlbuild -clean"
| "all" -> ocamlbuild ^ (List.assoc !Cmdline.flavor main_targets)
| test ->
| "clean" -> "ocamlbuild -clean"
| "all" -> ocamlbuild ^ (List.assoc !Cmdline.flavor main_targets)
| test ->