Skip to content

Commit

Permalink
Make the Rake tasks Compatible with stock OSX ruby/rake
Browse files Browse the repository at this point in the history
  • Loading branch information
jhs committed Jul 12, 2010
1 parent 1e97c7a commit ed122f3
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
4 changes: 3 additions & 1 deletion tasks/all.rake
Expand Up @@ -21,7 +21,9 @@ namespace :build do
desc 'Build CouchDB' desc 'Build CouchDB'
task :couchdb => ['erlang:build', :os_dependencies, 'tracemonkey:build', 'icu:build', COUCH_BIN] 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" source = "#{DEPS}/couchdb"
begin begin
Dir.chdir(source) { sh "./bootstrap" } # TODO: Use the built-in autoconf (with_autoconf '2.59') instead of depending on the system. Dir.chdir(source) { sh "./bootstrap" } # TODO: Use the built-in autoconf (with_autoconf '2.59') instead of depending on the system.
Expand Down
2 changes: 1 addition & 1 deletion tasks/distro.rake
@@ -1,6 +1,6 @@


task :known_distro => [ :known_mac, :known_ubuntu, :known_debian ] do 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 end


task :known_mac do task :known_mac do
Expand Down
1 change: 0 additions & 1 deletion tasks/export.rake
@@ -1,5 +1,4 @@
# Exporting the code for consumption # Exporting the code for consumption
load File.dirname(__FILE__) + '/places.rake'


require 'pathname' require 'pathname'
require 'fileutils' require 'fileutils'
Expand Down
2 changes: 1 addition & 1 deletion tasks/lib.rb
@@ -1,6 +1,6 @@
# Miscellaneous utilities # Miscellaneous utilities


load File.dirname(__FILE__) + '/places.rake' require File.dirname(__FILE__) + '/places'


def package_dep opts def package_dep opts
program_file, package = opts.first program_file, package = opts.first
Expand Down
12 changes: 0 additions & 12 deletions tasks/places.rake

This file was deleted.

11 changes: 11 additions & 0 deletions tasks/places.rb
@@ -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"
4 changes: 2 additions & 2 deletions tasks/toolchain.rake
Expand Up @@ -4,9 +4,9 @@ namespace :toolchain do


%w[ 2.13 2.59 ].each do |version| %w[ 2.13 2.59 ].each do |version|
label = "AUTOCONF_#{version.gsub /\W/, ''}" 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.mktmpdir "autoconf-#{version}_build" do |dir|
Dir.chdir dir do Dir.chdir dir do
begin begin
Expand Down

0 comments on commit ed122f3

Please sign in to comment.