Changeset 728

Show
Ignore:
Timestamp:
06/30/08 18:41:05 (2 months ago)
Author:
raggi
Message:

Make rakefile consistently handle $EVENTMACHINE_LIBRARY

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/raggi/Rakefile

    r708 r728  
    3535Dir.glob('tasks/*.rake').each { |r| Rake.application.add_import r } 
    3636 
    37 # e.g. rake EM_JAVA=true for forcing java build tasks as defaults! 
    38 java = ENV['EM_JAVA'] || RUBY_PLATFORM =~ /java/ 
    39 $eventmachine_library = :java if java 
     37# e.g. rake EVENTMACHINE_LIBRARY=java for forcing java build tasks as defaults! 
     38$eventmachine_library = :java if RUBY_PLATFORM =~ /java/ || ENV['EVENTMACHINE_LIBRARY'] == 'java' 
     39$eventmachine_library = :pure_ruby if ENV['EVENTMACHINE_LIBRARY'] == 'pure_ruby' 
    4040 
    4141# If running under rubygems... 
     
    5151task :gem_build => :build 
    5252 
    53 desc "Build extension and place in lib" 
    54 task :build => (java ? 'java:build' : 'ext:build') do |t| 
     53desc "Build extension (or EVENTMACHIINE_LIBRARY) and place in lib" 
     54build_task = 'ext:build' 
     55build_task = 'java:build' if $eventmachine_library == :java 
     56build_task = :dummy_build if $eventmachine_library == :pure_ruby 
     57task :build => build_task do |t| 
    5558  Dir.glob('{ext,java/src}/*.{so,bundle,dll,jar}').each do |f| 
    5659    mv f, "lib" 
    5760  end 
    5861end 
     62 
     63task :dummy_build 
    5964 
    6065# Basic clean definition, this is enhanced by imports aswell.