diff --git a/tasks/install.rake b/tasks/install.rake index c83d30a4e..5ee6302ad 100644 --- a/tasks/install.rake +++ b/tasks/install.rake @@ -1,16 +1,8 @@ desc "install compiled products" task :install => :install_bin do if host = MRuby.targets['host'] - install_D host.libmruby_static, File.join(MRuby::INSTALL_PREFIX, "lib", File.basename(host.libmruby_static)) - # install mruby.h and mrbconf.h - Dir.glob(File.join(MRUBY_ROOT, "include", "*.h")) do |src| - install_D src, File.join(MRuby::INSTALL_PREFIX, "include", File.basename(src)) - end - Dir.glob(File.join(MRUBY_ROOT, "include", "mruby", "*.h")) do |src| - install_D src, File.join(MRuby::INSTALL_PREFIX, "include", "mruby", File.basename(src)) - end - Dir.glob(File.join(File.join(MRUBY_ROOT, "build", "host", "include", "mruby", "presym", "*.h"))) do |src| - install_D src, File.join(MRuby::INSTALL_PREFIX, "include", "mruby", "presym", File.basename(src)) + Dir.glob(File.join(host.build_dir, "{include,lib}/**/*")) do |path| + install_D path, File.join(MRuby::INSTALL_PREFIX, path.relative_path_from(host.build_dir)) if File.file? path end end end @@ -18,8 +10,8 @@ end desc "install compiled executable (on host)" task :install_bin => :all do if host = MRuby.targets['host'] - Dir.glob(File.join(MRUBY_ROOT, "bin", "*")) do |src| - install_D src, File.join(MRuby::INSTALL_PREFIX, "bin", File.basename(src)) + Dir.glob(File.join(host.build_dir, "bin/**/*")) do |path| + install_D path, File.join(MRuby::INSTALL_PREFIX, path.relative_path_from(host.build_dir)) if File.file? path end end end