diff options
Diffstat (limited to 'tasks/mruby_build_commands.rake')
| -rw-r--r-- | tasks/mruby_build_commands.rake | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tasks/mruby_build_commands.rake b/tasks/mruby_build_commands.rake index 023b23763..6c160784b 100644 --- a/tasks/mruby_build_commands.rake +++ b/tasks/mruby_build_commands.rake @@ -49,8 +49,12 @@ module MRuby def run(outfile, infile, _defineds=[], _include_paths=[], _flags=[]) FileUtils.mkdir_p File.dirname(outfile) define_flags = [defines, _defineds].flatten.map{ |d| option_define % d } - include_path_flags = [include_paths, _include_paths, File.dirname(infile)].flatten.map{ |f| option_include_path % filename(f) } - _run compile_options, { :flags => (flags + define_flags + include_path_flags + _flags).join(' '), :infile => filename(infile), :outfile => filename(outfile) } + include_path_flags = [include_paths, _include_paths, File.dirname(infile)].flatten.map do |f| + option_include_path % filename(f) + end + _pp "CC #{filename(infile)} > #{filename(outfile)}" + _run compile_options, { :flags => (flags + define_flags + include_path_flags + _flags).join(' '), + :infile => filename(infile), :outfile => filename(outfile) } end def define_rules(build_dir, source_dir='') @@ -112,7 +116,10 @@ module MRuby FileUtils.mkdir_p File.dirname(outfile) library_flags = [libraries, _libraries].flatten.reverse.map{ |d| option_library % d } library_path_flags = [library_paths, _library_paths].flatten.map{ |f| option_library_path % filename(f) } - _run link_options, { :flags => (flags + library_path_flags + _flags).join(' '), :outfile => filename(outfile) , :objs => filename(objfiles).join(' '), :libs => library_flags.join(' ') } + _pp "LD #{filename(outfile)}" + _run link_options, { :flags => (flags + library_path_flags + _flags).join(' '), + :outfile => filename(outfile) , :objs => filename(objfiles).join(' '), + :libs => library_flags.join(' ') } end end @@ -127,6 +134,7 @@ module MRuby def run(outfile, objfiles) FileUtils.mkdir_p File.dirname(outfile) + _pp "AR #{filename(outfile)}" _run archive_options, { :outfile => filename(outfile), :objs => filename(objfiles).join(' ') } end end @@ -142,6 +150,7 @@ module MRuby def run(outfile, infile) FileUtils.mkdir_p File.dirname(outfile) + _pp "YACC #{filename(infile)} > #{filename(outfile)}" _run compile_options, { :outfile => filename(outfile) , :infile => filename(infile) } end end @@ -157,6 +166,7 @@ module MRuby def run(outfile, infile) FileUtils.mkdir_p File.dirname(outfile) + _pp "GPERF #{filename(infile)} > #{filename(outfile)}" _run compile_options, { :outfile => filename(outfile) , :infile => filename(infile) } end end @@ -173,6 +183,7 @@ module MRuby end def run_clone(dir, url, _flags = []) + _pp "GIT #{url} > #{filename(dir)}" _run clone_options, { :flags => [flags, _flags].flatten.join(' '), :url => url, :dir => filename(dir) } end end @@ -188,6 +199,7 @@ module MRuby @command ||= @build.mrbcfile IO.popen("#{filename @command} #{@compile_options % {:funcname => funcname}}", 'r+') do |io| [infiles].flatten.each do |f| + _pp " MRBC #{f}" io.write IO.read(f) end io.close_write @@ -195,4 +207,4 @@ module MRuby end end end -end
\ No newline at end of file +end |
