Skip to content

Commit

Permalink
Use mrubymix to process Ruby source code
Browse files Browse the repository at this point in the history
  • Loading branch information
xxuejie committed Jan 26, 2013
1 parent 2df1f36 commit a730c45
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -4,3 +4,6 @@
[submodule "modules/emscripten"] [submodule "modules/emscripten"]
path = modules/emscripten path = modules/emscripten
url = git://github.com/kripken/emscripten.git url = git://github.com/kripken/emscripten.git
[submodule "modules/mrubymix"]
path = modules/mrubymix
url = git://github.com/xxuejie/mrubymix.git
2 changes: 2 additions & 0 deletions Rakefile
Expand Up @@ -21,6 +21,8 @@ LIBMRUBY_FILE = File.join(MRUBY_DIR, LIBMRUBY)
MRBTEST = File.join(%w[build emscripten test mrbtest]) MRBTEST = File.join(%w[build emscripten test mrbtest])
MRBTEST_FILE = File.join(MRUBY_DIR, 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 # Specify supported loading modes of webruby, see rakelib/functions.rb file
# for details, by default all 3 loading modes are supported # for details, by default all 3 loading modes are supported
LOADING_MODE = ENV['LOADING_MODE'] || 2 LOADING_MODE = ENV['LOADING_MODE'] || 2
Expand Down
8 changes: 1 addition & 7 deletions app/app.rake
Expand Up @@ -17,11 +17,5 @@ file "#{BUILD_DIR}/rbcode.c" => ["#{BUILD_DIR}/rbcode.rb", "#{MRBC}"] do |t|
end end


file "#{BUILD_DIR}/rbcode.rb" => app_files do |t| file "#{BUILD_DIR}/rbcode.rb" => app_files do |t|
# Puts the entrypoint file at the end of the list sh "ruby #{MRUBYMIX} #{ENTRYPOINT_FILE} #{BUILD_DIR}/rbcode.rb"
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"
end end
1 change: 1 addition & 0 deletions modules/mrubymix
Submodule mrubymix added at 4154a8

0 comments on commit a730c45

Please sign in to comment.