From: Kim Nguyễn Date: Mon, 4 Mar 2013 20:49:55 +0000 (+0100) Subject: Allow one to pass several targets to the build script. X-Git-Tag: v0.1~169 X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=commitdiff_plain;h=eb43a243ba418e6023de2fc76b129542a5a49aff Allow one to pass several targets to the build script. --- diff --git a/build b/build index 4dba756..d5eb3a5 100755 --- a/build +++ b/build @@ -1,6 +1,6 @@ #!/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 @@ -14,12 +14,14 @@ let () = | "-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 "" -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;