projects
/
tatoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
40722c3
)
Allow one to pass several targets to the build script.
author
Kim Nguyễn
<kn@lri.fr>
Mon, 4 Mar 2013 20:49:55 +0000
(21:49 +0100)
committer
Kim Nguyễn
<kn@lri.fr>
Mon, 4 Mar 2013 20:49:55 +0000
(21:49 +0100)
build
patch
|
blob
|
history
diff --git
a/build
b/build
index
4dba756
..
d5eb3a5
100755
(executable)
--- a/
build
+++ b/
build
@@
-1,6
+1,6
@@
#!/usr/bin/env ocaml
#!/usr/bin/env ocaml
-let target = ref
"main.otarget"
+let target = ref
[ "main.otarget" ]
let debug = ref false
let profile = ref false
let verbose = ref false
let debug = ref false
let profile = ref false
let verbose = ref false
@@
-14,12
+14,14
@@
let () =
| "-d" -> debug := true
| "-p" -> profile := true
| "-v" -> verbose := true
| "-d" -> debug := true
| "-p" -> profile := true
| "-v" -> verbose := true
- | x -> target := x
+ | x -> target := x
:: !target
done
let oprofile = if !profile then " -tag profile " else ""
let odebug = if !profile then " -tag debug " else ""
done
let oprofile = if !profile then " -tag profile " else ""
let odebug = if !profile then " -tag debug " else ""
-let otarget = if !target = "clean" then " -clean " else !target
+let otarget = List.fold_left (fun acc t ->
+ let t = if t = "clean" then "-clean" else t in
+ t ^ " " ^ acc) "" !target
let overbose = if !verbose then " -classic-display " else ""
let () =
Sys.chdir project_root;
let overbose = if !verbose then " -classic-display " else ""
let () =
Sys.chdir project_root;