From 9c9c3b411f09225f1031a0267279b2141be90855 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Thu, 11 Apr 2013 12:49:57 +0900 Subject: Cosmetic changes. --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index ab5e6c6e6..9c6c3cbb8 100644 --- a/Rakefile +++ b/Rakefile @@ -48,12 +48,12 @@ depfiles = MRuby.targets['host'].bins.map do |bin| end MRuby.each_target do - gems.map do | gem | + gems.map do |gem| current_dir = gem.dir.relative_path_from(Dir.pwd) relative_from_root = gem.dir.relative_path_from(MRUBY_ROOT) current_build_dir = "#{build_dir}/#{relative_from_root}" - gem.bins.each do | bin | + gem.bins.each do |bin| exec = exefile("#{build_dir}/bin/#{bin}") objs = Dir.glob("#{current_dir}/tool/#{bin}/*.c").map { |f| objfile(f.pathmap("#{current_build_dir}/tool/#{bin}/%n")) } -- cgit v1.2.3 From 1b4ad941b4c715087f98ee15c4949898c25d00eb Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Thu, 11 Apr 2013 12:52:20 +0900 Subject: Use not tool/ but tools/. This is for naming consistency. --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 9c6c3cbb8..71c344baa 100644 --- a/Rakefile +++ b/Rakefile @@ -55,7 +55,7 @@ MRuby.each_target do gem.bins.each do |bin| exec = exefile("#{build_dir}/bin/#{bin}") - objs = Dir.glob("#{current_dir}/tool/#{bin}/*.c").map { |f| objfile(f.pathmap("#{current_build_dir}/tool/#{bin}/%n")) } + objs = Dir.glob("#{current_dir}/tools/#{bin}/*.c").map { |f| objfile(f.pathmap("#{current_build_dir}/tools/#{bin}/%n")) } file exec => objs + [libfile("#{build_dir}/lib/libmruby")] do |t| gem_flags = gems.map { |g| g.linker.flags } -- cgit v1.2.3 From 9cf7d54b5713c9471dffc08c4dcb6396084f12d0 Mon Sep 17 00:00:00 2001 From: Masaki Muranaka Date: Thu, 11 Apr 2013 12:53:54 +0900 Subject: Move apps in gems to #{MRUBY_ROOT}/bin/ when apps is built for "host". --- Rakefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index 71c344baa..a09dde6dd 100644 --- a/Rakefile +++ b/Rakefile @@ -47,7 +47,7 @@ depfiles = MRuby.targets['host'].bins.map do |bin| install_path end -MRuby.each_target do +MRuby.each_target do |target| gems.map do |gem| current_dir = gem.dir.relative_path_from(Dir.pwd) relative_from_root = gem.dir.relative_path_from(MRUBY_ROOT) @@ -66,7 +66,17 @@ MRuby.each_target do linker.run t.name, t.prerequisites, gem_libraries, gem_library_paths, gem_flags, gem_flags_before_libraries end - depfiles += [ exec ] + if target == MRuby.targets['host'] + install_path = MRuby.targets['host'].exefile("#{MRUBY_ROOT}/bin/#{bin}") + + file install_path => exec do |t| + FileUtils.rm_f t.name, { :verbose => $verbose } + FileUtils.cp t.prerequisites.first, t.name, { :verbose => $verbose } + end + depfiles += [ install_path ] + else + depfiles += [ exec ] + end end end end -- cgit v1.2.3