Permalink
Browse files

Use mrubymix to process Ruby source code

  • Loading branch information...
xxuejie committed Jan 26, 2013
1 parent 2df1f36 commit a730c458e48e7fb2bee8de043929ac732a279f64
Showing with 7 additions and 7 deletions.
  1. +3 −0 .gitmodules
  2. +2 −0 Rakefile
  3. +1 −7 app/app.rake
  4. +1 −0 modules/mrubymix
View
@@ -4,3 +4,6 @@
[submodule "modules/emscripten"]
path = modules/emscripten
url = git://github.com/kripken/emscripten.git
[submodule "modules/mrubymix"]
path = modules/mrubymix
url = git://github.com/xxuejie/mrubymix.git
View
@@ -21,6 +21,8 @@ LIBMRUBY_FILE = File.join(MRUBY_DIR, LIBMRUBY)
MRBTEST = File.join(%w[build emscripten test mrbtest])
MRBTEST_FILE = File.join(MRUBY_DIR, MRBTEST)
MRUBYMIX = File.join(BASE_DIR, %w[modules mrubymix bin mrubymix])
# Specify supported loading modes of webruby, see rakelib/functions.rb file
# for details, by default all 3 loading modes are supported
LOADING_MODE = ENV['LOADING_MODE'] || 2
View
@@ -17,11 +17,5 @@ file "#{BUILD_DIR}/rbcode.c" => ["#{BUILD_DIR}/rbcode.rb", "#{MRBC}"] do |t|
end
file "#{BUILD_DIR}/rbcode.rb" => app_files do |t|
# Puts the entrypoint file at the end of the list
if (i = app_files.index(ENTRYPOINT_FILE))
last_i = app_files.length - 1
app_files[i], app_files[last_i] = app_files[last_i], app_files[i]
end
sh "cat #{app_files.join(' ')} > #{BUILD_DIR}/rbcode.rb"
sh "ruby #{MRUBYMIX} #{ENTRYPOINT_FILE} #{BUILD_DIR}/rbcode.rb"
end
Submodule mrubymix added at 4154a8

0 comments on commit a730c45

Please sign in to comment.