| false -> exit 1
;;
+let nodb_doc = "
+\tParameters:
+\tDescription: avoid using external database connection."
+
+let nodb _ = Helm_registry.set_bool "db.nodb" true
+
let target args =
if List.length args < 1 then !usage ();
let dev = dev_for_dir (Unix.getcwd ()) in
"-list", list_dev, list_dev_doc;
"-destroy", destroy_dev, destroy_dev_doc;
"-build", build_dev, build_dev_doc;
+ "-nodb", nodb, nodb_doc;
"-h", (fun _ -> !usage()), "print this help screen";
"-help", (fun _ -> !usage()), "print this help screen";
]
exit 1
;;
-let parse args =
+let rec parse args =
match args with
| [] -> target ["all"]
| s::tl ->
try
let _,f,_ = List.find (fun (n,_,_) -> n = s) params in
- f tl
+ f tl;
+ parse tl
with Not_found -> if s.[0] = '-' then !usage () else target args
let _ =
let call_make development target make =
rebuild_makefile development;
let makefile = makefile_for_development development in
+ let nodb =
+ Helm_registry.get_opt_default Helm_registry.bool ~default:false "db.nodb"
+ in
+ let flags = if nodb then ["NODB=true"] else [] in
make development.root
- ["--no-print-directory"; "-s"; "-k"; "-f"; makefile; target]
+ (["--no-print-directory"; "-s"; "-k"; "-f"; makefile; target]
+ @ flags)
let build_development ?(target="all") development =
call_make development target make