Files copied by task install should be from the build directory

This commit is contained in:
dearblue
2023-02-12 21:02:29 +09:00
parent aac2fd7055
commit 7fd7409bf2
+4 -12
View File
@@ -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