|
@@ -1528,45 +1528,44 @@ try
|
|
|
| Cpp | Cs | Java | Php -> Common.mkdir_from_path (com.file ^ "/.")
|
|
|
| _ -> Common.mkdir_from_path com.file
|
|
|
end;
|
|
|
- (match com.platform with
|
|
|
- | _ when !no_output ->
|
|
|
- ()
|
|
|
- | _ when !interp ->
|
|
|
- let ctx = Interp.create com (Typer.make_macro_api tctx Ast.null_pos) in
|
|
|
- Interp.add_types ctx com.types (fun t -> ());
|
|
|
- (match com.main with
|
|
|
- | None -> ()
|
|
|
- | Some e -> ignore(Interp.eval_expr ctx e));
|
|
|
- | Cross ->
|
|
|
- ()
|
|
|
- | Flash when Common.defined com Define.As3 ->
|
|
|
- Common.log com ("Generating AS3 in : " ^ com.file);
|
|
|
- Genas3.generate com;
|
|
|
- | Flash ->
|
|
|
- Common.log com ("Generating swf : " ^ com.file);
|
|
|
- Genswf.generate com !swf_header;
|
|
|
- | Neko ->
|
|
|
- Common.log com ("Generating neko : " ^ com.file);
|
|
|
- Genneko.generate com;
|
|
|
- | Js ->
|
|
|
- Common.log com ("Generating js : " ^ com.file);
|
|
|
- Genjs.generate com
|
|
|
- | Php ->
|
|
|
- Common.log com ("Generating PHP in : " ^ com.file);
|
|
|
- Genphp.generate com;
|
|
|
- | Cpp ->
|
|
|
- Common.log com ("Generating Cpp in : " ^ com.file);
|
|
|
- Gencpp.generate com;
|
|
|
- | Cs ->
|
|
|
- Common.log com ("Generating Cs in : " ^ com.file);
|
|
|
- Gencs.generate com;
|
|
|
- | Java ->
|
|
|
- Common.log com ("Generating Java in : " ^ com.file);
|
|
|
- Genjava.generate com;
|
|
|
- | Python ->
|
|
|
- Common.log com ("Generating python in : " ^ com.file);
|
|
|
- Genpy.generate com;
|
|
|
- );
|
|
|
+ if not !no_output then begin
|
|
|
+ if !interp then begin
|
|
|
+ let ctx = Interp.create com (Typer.make_macro_api tctx Ast.null_pos) in
|
|
|
+ Interp.add_types ctx com.types (fun t -> ());
|
|
|
+ (match com.main with
|
|
|
+ | None -> ()
|
|
|
+ | Some e -> ignore(Interp.eval_expr ctx e));
|
|
|
+ end else if com.platform = Cross then
|
|
|
+ ()
|
|
|
+ else begin
|
|
|
+ let generate,name = match com.platform with
|
|
|
+ | Flash when Common.defined com Define.As3 ->
|
|
|
+ Genas3.generate,"AS3"
|
|
|
+ | Flash ->
|
|
|
+ Genswf.generate !swf_header,"swf"
|
|
|
+ | Neko ->
|
|
|
+ Genneko.generate,"neko"
|
|
|
+ | Js ->
|
|
|
+ Genjs.generate,"js"
|
|
|
+ | Php ->
|
|
|
+ Genphp.generate,"php"
|
|
|
+ | Cpp ->
|
|
|
+ Gencpp.generate,"cpp"
|
|
|
+ | Cs ->
|
|
|
+ Gencs.generate,"cs"
|
|
|
+ | Java ->
|
|
|
+ Genjava.generate,"java"
|
|
|
+ | Python ->
|
|
|
+ Genpy.generate,"python"
|
|
|
+ | Cross ->
|
|
|
+ assert false
|
|
|
+ in
|
|
|
+ Common.log com ("Generating " ^ name ^ ": " ^ com.file);
|
|
|
+ let t = Common.timer ("generate " ^ name) in
|
|
|
+ generate com;
|
|
|
+ t()
|
|
|
+ end
|
|
|
+ end
|
|
|
end;
|
|
|
Sys.catch_break false;
|
|
|
List.iter (fun f -> f()) (List.rev com.final_filters);
|