# HG changeset patch # User anatofuz # Date 1575337546 -32400 # Node ID 46d792f9215678f57f38b89fb01bbbfdc319588c # Parent 99be03babde3c07b21147544b04f91b0e3eb518c impl output option at trans_impl.pl diff -r 99be03babde3 -r 46d792f92156 src/gearsTools/trans_impl.pl --- a/src/gearsTools/trans_impl.pl Tue Dec 03 09:42:38 2019 +0900 +++ b/src/gearsTools/trans_impl.pl Tue Dec 03 10:45:46 2019 +0900 @@ -10,7 +10,7 @@ use File::Spec; my %opt; -getopts("w" => \%opt); +getopts("wo:" => \%opt); my $impl_file = shift or die 'require impl file'; my $impl_ir = Gears::Util->parse_with_rewrite(File::Spec->rel2abs($impl_file)); @@ -25,8 +25,11 @@ if ($opt{w}) { open $stdout, '>', $output_file; +} elsif ($opt{o}) { + open $stdout, '>', $opt{o}; } + emit_include_part($stdout, $inter_ir->{name}); emit_impl_header_in_comment($stdout, $impl_file); emit_constracutor($stdout,$impl_ir,$inter_ir);