Permalink
Browse files

Correct --prefix option for the various ./configure commands

  • Loading branch information...
1 parent 46aee92 commit c299649c5eeb06a19a1fb73b6e07a2de8efd2585 @jhs jhs committed Mar 24, 2011
Showing with 9 additions and 4 deletions.
  1. +1 −1 tasks/couchdb.rake
  2. +1 −1 tasks/curl.rake
  3. +1 −1 tasks/environment.rake
  4. +6 −1 tasks/lib.rb
View
@@ -66,7 +66,7 @@ namespace :couchdb do
Dir.mktmpdir 'couchdb-build' do |dir|
Dir.chdir dir do
show_file("config.log") do
- sh(configure_cmd(source, :prefix => true))
+ sh(configure_cmd(source, :prefix => :couch))
end
gmake
View
@@ -15,7 +15,7 @@ namespace :curl do
Dir.mktmpdir 'curl-build' do |dir|
Dir.chdir dir do
show_file("config.log") do
- sh(configure_cmd(source, :prefix => true))
+ sh(configure_cmd(source, :prefix => :deps))
end
gmake
View
@@ -40,7 +40,7 @@ namespace :environment do
puts "export PATH=\"#{BUILD}/bin:$PATH\""
end
puts "export DYLD_LIBRARY_PATH=\"#{BUILD}/lib:$DYLD_LIBRARY_PATH\"" if DISTRO[0] == :osx
- puts(configure_cmd(".", :prefix => false))
+ puts(configure_cmd(".", :prefix => nil))
end
end
View
@@ -302,7 +302,12 @@ def configure_cmd(source, opts={})
ldflags += ' -llber' if DISTRO[0] == :solaris
env = "LDFLAGS='#{ldflags}' CFLAGS='-I#{BUILD}/include/js'"
- prefix = (opts[:prefix].nil? || opts[:prefix]) ? "--prefix=#{COUCH_BUILD}" : ""
+
+ # Determine whether to use a --prefix parameter. Default is to use it.
+ prefix = ""
+ prefix = "--prefix='#{COUCH_BUILD}'" if prefix == :couch
+ prefix = "--prefix='#{BUILD}'" if prefix == :deps
+
return "env #{env} #{source}/configure #{prefix} --with-erlang=#{BUILD}/lib/erlang/usr/include"
end

0 comments on commit c299649

Please sign in to comment.