Skip to content
Browse files

A way to keep some Erlang libraries

  • Loading branch information...
1 parent 3b412e4 commit dc2ce2324c13165171d0e2c7c4a468a88d68969e @jhs jhs committed
Showing with 17 additions and 2 deletions.
  1. +13 −0 README.md
  2. +4 −2 tasks/erlang.rake
View
13 README.md
@@ -139,4 +139,17 @@ as I use them in quite different situations.
[geocouch]: http://vmx.cx/cgi-bin/blog/index.cgi/geocouch-the-future-is-now:2010-05-03:en,CouchDB,Python,Erlang,geo
+### Do not strip down Erlang/OTP
+
+Build CouchDB strips many modules out of the Erlang platform to reduce disk
+usage. (You can see which ones at the top of `tasks/erlang.rake`.) To indicate
+that a package should be kept, set the `otp_keep` variable to space-separated
+library names.
+
+ rake otp_keep="compiler eunit"
+
+Or, you can keep them all this way:
+
+ rake otp_keep="*"
+
vim: tw=80
View
6 tasks/erlang.rake
@@ -44,8 +44,10 @@ namespace :erlang do
end
configure.push '--enable-darwin-64bit' if DISTRO[0] == :osx
+ otp_keep = ENV['otp_keep'] || ''
+
OTP_SKIP_COMPILE.each do |lib|
- FileUtils.touch "#{DEPS}/otp/lib/#{lib}/SKIP"
+ FileUtils.touch "#{DEPS}/otp/lib/#{lib}/SKIP" unless otp_keep == '*' || otp_keep.split.include?(lib)
end
sh configure.join(' ')
@@ -73,7 +75,7 @@ namespace :erlang do
lib = "#{erlang}/lib"
(OTP_REMOVE + OTP_SKIP_COMPILE).each do |component|
- sh "rm -rf #{lib}/#{component}-*"
+ sh "rm -rf #{lib}/#{component}-*" unless otp_keep == '*' || otp_keep.split.include?(component)
end
# Remove unnecessary directories for running.

0 comments on commit dc2ce23

Please sign in to comment.
Something went wrong with that request. Please try again.