Skip to content

Commit

Permalink
Restore generation of ruby_config and rubinius_config, add clean rules
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Oct 2, 2008
1 parent 7b966a8 commit af222ee
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Rakefile
Expand Up @@ -184,10 +184,19 @@ desc "Recompile all ruby system files"
task :rebuild => %w[clean build]

desc 'Remove rubinius build files'
task :clean => %w[vm:clean kernel:clean clean:crap extension:clean]
task :clean => %w[
vm:clean
kernel:clean
clean:crap
extension:clean
configure:clean
]

desc 'Remove rubinius build files and external library build files'
task :distclean => %w[vm:distclean]
task :distclean => %w[
clean
vm:distclean
]

namespace :clean do
desc "Cleans up editor files and other misc crap"
Expand Down
50 changes: 50 additions & 0 deletions rakelib/configure.rake
Expand Up @@ -225,3 +225,53 @@ EOC
f.puts "RbConfig = Config"
end
end

file 'kernel/bootstrap/rubinius_config.rb' =>
%w[rakelib/configuration.rb rakelib/configure.rake] do |task, args|
open task.name, 'w' do |io|
io << <<-EOF
#--
# This file was generated from rakelib/configure.rake
#++
module Rubinius
BUILDREV = #{RBX_BUILDREV.inspect}
CODE_PATH = #{RBX_CODE_PATH.inspect}
EXT_PATH = #{RBX_EXT_PATH.inspect}
RBA_PATH = #{RBX_RBA_PATH.inspect}
RBX_VERSION = #{RBX_VERSION.inspect}
end
EOF
end
end

file 'kernel/bootstrap/ruby_config.rb' =>
%w[rakelib/configuration.rb rakelib/configure.rake] do |task, args|
open task.name, 'w' do |io|
io << <<-EOF
#--
# This file was generated from rakelib/configure.rake
#++
PLATFORM = #{RBX_HOST.inspect}
RUBY_ENGINE = #{RBX_RUBY_ENGINE.inspect}
RUBY_PATCHLEVEL = #{RBX_RUBY_PATCHLEVEL.inspect}
RUBY_PLATFORM = #{RBX_HOST.inspect}
RUBY_RELEASE_DATE = #{RBX_RUBY_RELDATE.inspect}
RUBY_VERSION = #{RBX_RUBY_VERSION.inspect}
VERSION = #{RBX_RUBY_VERSION.inspect}
EOF
end
end

namespace :configure do
task :clean do
rm 'lib/rbconfig.rb'
rm 'kernel/bootstrap/rubinius_config.rb'
rm 'kernel/bootstrap/ruby_config.rb'
end
end

0 comments on commit af222ee

Please sign in to comment.