Version 0.4.1
- * Support -I option.
+ * Add -I option. Add include directories
* Add standard library(std and flash)
+ * Add --keep-files to keep temporary files
Version 0.4.0
* Support module
}
type general = {
- verbose: bool;
+ verbose: bool;
just_print: bool;
+ keep_files: bool;
}
type t = {
~short_name:'n'
~long_name:"just-print"
~help:"Don't actually run any commands; just print them" () in
+ let keep_files =
+ bool_option
+ ~default:false
+ ~short_name:'k'
+ ~long_name:"keep-files"
+ ~help:"Keep temporary files" () in
fun () -> {
- verbose = Opt.get verbose;
+ verbose = Opt.get verbose;
just_print = Opt.get just_print;
+ keep_files = Opt.get keep_files
}
let output_type =
main_class: string;
}
-type swfx = { swfx_cmd : string; }
-type general = { verbose : bool; just_print: bool; }
+type swfx = {
+ swfx_cmd : string;
+}
+
+type general = {
+ verbose : bool;
+ just_print: bool;
+ keep_files: bool;
+}
+
type t = {
inputs : string list;
output : string;
"__ABCX__",input;
"__MAIN_CLASS__",main;
"__WIDTH__",string_of_int w;
- "__HEIGHT__",string_of_int h;
+ "__HEIGHT__",string_of_int h;
])
template output]);
one_to_one "swfx" "swf"
Rule.commands ctx rules inputs output in
if ctx.general.just_print then
List.iter print_endline commands
- else
- execute ctx commands
+ else begin
+ execute ctx commands;
+ if not ctx.general.keep_files then
+ List.iter Sys.remove @@ Rule.temp_files ctx rules inputs output
+ end
let _ =
if not !Sys.interactive then