Permalink
Browse files

Make the Rake tasks Compatible with stock OSX ruby/rake

  • Loading branch information...
1 parent 1e97c7a commit ed122f372dfbcd8548a92a826fa1d6ffcd15d6a1 @jhs jhs committed Jul 12, 2010
Showing with 18 additions and 18 deletions.
  1. +3 −1 tasks/all.rake
  2. +1 −1 tasks/distro.rake
  3. +0 −1 tasks/export.rake
  4. +1 −1 tasks/lib.rb
  5. +0 −12 tasks/places.rake
  6. +11 −0 tasks/places.rb
  7. +2 −2 tasks/toolchain.rake
View
@@ -21,7 +21,9 @@ namespace :build do
desc 'Build CouchDB'
task :couchdb => ['erlang:build', :os_dependencies, 'tracemonkey:build', 'icu:build', COUCH_BIN]
- file COUCH_BIN => AUTOCONF_259 do
+ directory "#{BUILD}/var/run/couchdb"
+
+ file COUCH_BIN => [AUTOCONF_259, "#{BUILD}/var/run/couchdb"] do
source = "#{DEPS}/couchdb"
begin
Dir.chdir(source) { sh "./bootstrap" } # TODO: Use the built-in autoconf (with_autoconf '2.59') instead of depending on the system.
View
@@ -1,6 +1,6 @@
task :known_distro => [ :known_mac, :known_ubuntu, :known_debian ] do
- raise 'Unknown distribution, build not supported' unless Kernel.const_defined? 'DISTRO'
+ raise 'Unknown distribution, build not supported' unless Object.const_defined? 'DISTRO'
end
task :known_mac do
View
@@ -1,5 +1,4 @@
# Exporting the code for consumption
-load File.dirname(__FILE__) + '/places.rake'
require 'pathname'
require 'fileutils'
View
@@ -1,6 +1,6 @@
# Miscellaneous utilities
-load File.dirname(__FILE__) + '/places.rake'
+require File.dirname(__FILE__) + '/places'
def package_dep opts
program_file, package = opts.first
View
@@ -1,12 +0,0 @@
-DEPS = "#{HERE}/dependencies" unless Kernel.const_defined? 'DEPS'
-RUBY_BUILD = "#{DEPS}/ruby-inabox/build" unless Kernel.const_defined? 'BUILD'
-BUILD = "#{HERE}/build" unless Kernel.const_defined? 'BUILD'
-JS_LIB = "#{BUILD}/bin/js-config" unless Kernel.const_defined? 'JS_LIB'
-ERL_BIN = "#{BUILD}/bin/erl" unless Kernel.const_defined? 'ERL_BIN'
-ICU_BIN = "#{BUILD}/bin/icu-config" unless Kernel.const_defined? 'ICU_BIN'
-
-PIDS = "#{BUILD}/var/run/couchdb" unless Kernel.const_defined? 'PIDS'
-directory PIDS
-
-AUTOCONF_213 = "#{RUBY_BUILD}/bin/autoconf2.13" unless Kernel.const_defined? 'AUTOCONF_213'
-AUTOCONF_259 = "#{RUBY_BUILD}/bin/autoconf2.59" unless Kernel.const_defined? 'AUTOCONF_259'
View
@@ -0,0 +1,11 @@
+DEPS = "#{HERE}/dependencies"
+RUBY_BUILD = "#{DEPS}/ruby-inabox/build"
+BUILD = "#{HERE}/build"
+JS_LIB = "#{BUILD}/bin/js-config"
+ERL_BIN = "#{BUILD}/bin/erl"
+ICU_BIN = "#{BUILD}/bin/icu-config"
+
+PIDS = "#{BUILD}/var/run/couchdb"
+
+AUTOCONF_213 = "#{RUBY_BUILD}/bin/autoconf2.13"
+AUTOCONF_259 = "#{RUBY_BUILD}/bin/autoconf2.59"
View
@@ -4,9 +4,9 @@ namespace :toolchain do
%w[ 2.13 2.59 ].each do |version|
label = "AUTOCONF_#{version.gsub /\W/, ''}"
- raise "Woah, why am I bothering to build autoconf #{version}? There is no #{label} constant" unless Kernel.const_defined? label
+ raise "Woah, why am I bothering to build autoconf #{version}? There is no #{label} constant" unless Object.const_defined? label
- file Kernel.const_get(label) do
+ file Object.const_get(label) do
Dir.mktmpdir "autoconf-#{version}_build" do |dir|
Dir.chdir dir do
begin

0 comments on commit ed122f3

Please sign in to comment.