Permalink
Browse files

Use Rake dependencies to copy transcoder libraries.

  • Loading branch information...
1 parent e1fdbb7 commit 6a987bf75c93ae156bb155f8c8551d7f35210913 @brixen brixen committed Oct 21, 2012
Showing with 15 additions and 25 deletions.
  1. +15 −25 rakelib/vm.rake
View
@@ -45,12 +45,26 @@ TYPE_GEN = %w[ vm/gen/includes.hpp
vm/gen/jit_resolver.cpp
vm/gen/invoke_resolver.cpp ]
+transcoders_src_dir = File.expand_path "../../vendor/oniguruma/enc/trans", __FILE__
+transcoders_lib_dir = File.expand_path "../../lib/19/encoding/converter", __FILE__
+directory transcoders_lib_dir
+
+TRANSCODING_LIBS = []
+
+Dir["#{transcoders_src_dir}/*#{$dlext}"].each do |name|
+ target = File.join transcoders_lib_dir, File.basename(name)
+ file target => name do |t|
+ cp t.prerequisites.first, t.name
+ end
+ TRANSCODING_LIBS << target
+end
+
GENERATED = %W[ vm/gen/revision.h
vm/gen/config_variables.h
vm/gen/signature.h
#{encoding_database}
#{transcoders_database}
- ] + TYPE_GEN + INSN_GEN
+ ] + TYPE_GEN + INSN_GEN + TRANSCODING_LIBS
# Files are in order based on dependencies. For example,
# CompactLookupTable inherits from Tuple, so the header
@@ -201,23 +215,8 @@ file encoding_database => encoding_extract do |t|
ruby encoding_extract, dir, t.name
end
-transcoders_lib_dir = File.expand_path "../../lib/19/encoding/converter", __FILE__
-directory transcoders_lib_dir
-
transcoders_extract = 'vm/codegen/transcoders_extract.rb'
-transcoders_src_dir = File.expand_path "../../vendor/oniguruma/enc/trans", __FILE__
-
-TRANSCODING_LIBS = []
-
-Dir["#{transcoders_src_dir}/*#{$dlext}"].each do |name|
- target = File.join transcoders_lib_dir, File.basename(name)
- file target => name do |t|
- cp t.prerequisites.first, t.name
- end
- TRANSCODING_LIBS << target
-end
-
file transcoders_database => [transcoders_lib_dir, transcoders_extract] + TRANSCODING_LIBS do |t|
ruby transcoders_extract, transcoders_src_dir, t.name
end
@@ -265,15 +264,6 @@ task 'vm/test/runner' => GENERATED do
blueprint.build "vm/test/runner", @parallel_jobs
end
-task :transcoders => 'vendor/oniguruma/libonig.a' do
- dir = "lib/19/encoding/converter"
- mkdir_p dir
-
- Dir["vendor/oniguruma/enc/trans/*#{$dlext}"].each do |lib|
- cp lib, dir
- end
-end
-
# Generate files for instructions and interpreters
file "gen/method_primitives.cpp" => field_extract_headers

0 comments on commit 6a987bf

Please sign in to comment.