Permalink
Browse files

[source] compile with all processors when known. Default:2

  • Loading branch information...
1 parent 9e39a20 commit 3dd7eaec75a6cc96176489dc77b02126b3f8a0a2 Chris Lundquist committed Jan 5, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 recipes/install_from_source.rb
@@ -50,11 +50,13 @@
end
bash "compile node.js" do
+ # OSX doesn't have the attribute so arbitrarily default 2
+ make_threads = node['cpu'] ? node['cpu']['total'].to_i : 2
cwd "/usr/local/src/node-v#{node['nodejs']['version']}"
code <<-EOH
PATH="/usr/local/bin:$PATH"
./configure --prefix=#{node['nodejs']['dir']} && \
- make
+ make -j #{make_threads}
EOH
creates "/usr/local/src/node-v#{node['nodejs']['version']}/node"
end

0 comments on commit 3dd7eae

Please sign in to comment.