summaryrefslogtreecommitdiffhomepage
path: root/tasks/rules.rake
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-01-20 14:41:50 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2013-01-20 14:41:50 -0800
commit8e86ff2283d427b5cb2a02607e1aab998cb5090c (patch)
treebd40d166673b2290053f1742660d573d5586a974 /tasks/rules.rake
parentcc16bd7c0d70b326ddcf8de8a511116dae9fc30d (diff)
parentced80d2b4b1ed4ef0752a8bbaf0dbfe7aa6c6a95 (diff)
downloadmruby-8e86ff2283d427b5cb2a02607e1aab998cb5090c.tar.gz
mruby-8e86ff2283d427b5cb2a02607e1aab998cb5090c.zip
Merge pull request #755 from masuidrive/imprive_build_scripts
Improved build scripts and config files
Diffstat (limited to 'tasks/rules.rake')
-rw-r--r--tasks/rules.rake43
1 files changed, 0 insertions, 43 deletions
diff --git a/tasks/rules.rake b/tasks/rules.rake
deleted file mode 100644
index beda2a864..000000000
--- a/tasks/rules.rake
+++ /dev/null
@@ -1,43 +0,0 @@
-def get_dependencies(file)
- file = file.ext('d') unless File.extname(file) == '.d'
- if File.exists?(file)
- File.read(file).gsub("\\\n ", "").scan(/^\S+:\s+(.+)$/).flatten.map {|s| s.split(' ') }.flatten
- else
- []
- end
-end
-
-MRuby.each_target do |t|
- obj_matcher = Regexp.new("^#{build_dir}/(.*)\\.o$")
- {
- '.c' => proc { |t| compile_c t.name, t.prerequisites.first },
- '.cpp' => proc { |t| compile_cxx t.name, t.prerequisites.first },
- '.cxx' => proc { |t| compile_cxx t.name, t.prerequisites.first },
- '.cc' => proc { |t| compile_cxx t.name, t.prerequisites.first },
- '.m' => proc { |t| compile_objc t.name, t.prerequisites.first },
- '.S' => proc { |t| compile_asm t.name, t.prerequisites.first }
- }.each do |ext, compile|
- rule obj_matcher => [
- proc { |file|
- file.sub(obj_matcher, "\\1#{ext}")
- },
- proc { |file|
- get_dependencies(file)
- }] do |t|
- FileUtils.mkdir_p File.dirname(t.name)
- compile.call t
- end
-
- rule obj_matcher => [
- proc { |file|
- file.sub(obj_matcher, "#{build_dir}/\\1#{ext}")
- },
- proc { |file|
- get_dependencies(file)
- }] do |t|
- FileUtils.mkdir_p File.dirname(t.name)
- compile.call t
- end
- end
-end
-