Mercurial > hg > Members > menikon > CbC_xv6
changeset 127:46d792f92156
impl output option at trans_impl.pl
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 03 Dec 2019 10:45:46 +0900 |
parents | 99be03babde3 |
children | 7ce72e373d9b |
files | src/gearsTools/trans_impl.pl |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);