Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only build C-ext for enabled language versions.

  • Loading branch information...
commit 028cb3df656deadf3b0865e06e02cd90482c69be 1 parent e016932
@brixen brixen authored
Showing with 58 additions and 47 deletions.
  1. +58 −47 rakelib/extensions.rake
View
105 rakelib/extensions.rake
@@ -120,10 +120,13 @@ File.open(build_ruby, "wb") do |f|
f.puts build_version
end
+enabled_18 = BUILD_CONFIG[:version_list].include?("18")
+enabled_19 = BUILD_CONFIG[:version_list].include?("19")
+
compile_ext "melbourne", :task => "build",
:doc => "for bootstrapping"
-melbourne_env = BUILD_CONFIG[:version_list].include?("19") ? "-X19" : "-X18"
+melbourne_env = enabled_19 ? "-X19" : "-X18"
compile_ext "melbourne", :task => "rbx",
:env => melbourne_env,
:doc => "for Rubinius"
@@ -135,55 +138,63 @@ compile_ext "digest:sha1", :dir => "lib/digest/ext/sha1"
compile_ext "digest:sha2", :dir => "lib/digest/ext/sha2"
compile_ext "digest:bubblebabble", :dir => "lib/digest/ext/bubblebabble"
-compile_ext "bigdecimal", :dir => "lib/18/bigdecimal/ext", :env => "-X18"
-compile_ext "bigdecimal", :dir => "lib/19/bigdecimal/ext",
- :deps => ["Makefile", "extconf.rb"],
- :env => "-X19"
-
-compile_ext "18/syck", :dir => "lib/18/syck/ext"
-compile_ext "18/nkf", :dir => "lib/18/nkf/ext", :env => "-X18"
-compile_ext "19/nkf", :dir => "lib/19/nkf/ext",
- :deps => ["Makefile", "extconf.rb"],
- :env => "-X19"
-
-if BUILD_CONFIG[:readline] == :c_readline
- compile_ext "18/readline", :dir => "lib/18/readline/ext"
- compile_ext "19/readline", :dir => "lib/19/readline/ext",
- :deps => ["Makefile", "extconf.rb"],
- :env => "-X19"
-end
+if enabled_18
+ compile_ext "18/bigdecimal", :dir => "lib/18/bigdecimal/ext", :env => "-X18"
+
+ compile_ext "18/syck", :dir => "lib/18/syck/ext"
+ compile_ext "18/nkf", :dir => "lib/18/nkf/ext", :env => "-X18"
+
+ if BUILD_CONFIG[:readline] == :c_readline
+ compile_ext "18/readline", :dir => "lib/18/readline/ext"
+ end
+
+ # rbx must be able to run to build these because they use
+ # extconf.rb, so they must be after melbourne for Rubinius.
+ compile_ext "18/openssl", :deps => ["Makefile", "extconf.h"],
+ :dir => "lib/18/openssl/ext",
+ :env => "-X18"
+
+ compile_ext "18/dl", :deps => ["Makefile", "dlconfig.h"],
+ :dir => "lib/18/dl/ext", :env => "-X18"
-if BUILD_CONFIG[:libyaml]
- compile_ext "19/psych", :deps => ["Makefile"], :dir => "lib/19/psych/ext", :env => "-X19"
+ compile_ext "18/pty", :deps => ["Makefile"],
+ :dir => "lib/18/pty/ext",
+ :env => "-X18"
end
-compile_ext "19/syck", :deps => ["Makefile"], :dir => "lib/19/syck/ext", :env => "-X19"
-
-compile_ext "json/parser", :deps => ["Makefile", "extconf.rb"],
- :dir => "lib/19/json/ext/parser",
- :env => "-X19"
-compile_ext "json/generator", :deps => ["Makefile", "extconf.rb"],
- :dir => "lib/19/json/ext/generator",
- :env => "-X19"
-
-# rbx must be able to run to build these because they use
-# extconf.rb, so they must be after melbourne for Rubinius.
-compile_ext "18/openssl", :deps => ["Makefile", "extconf.h"],
- :dir => "lib/18/openssl/ext",
- :env => "-X18"
-compile_ext "19/openssl", :deps => ["Makefile", "extconf.h"],
- :dir => "lib/19/openssl/ext",
- :env => "-X19"
-
-compile_ext "18/dl", :deps => ["Makefile", "dlconfig.h"],
- :dir => "lib/18/dl/ext", :env => "-X18"
-
-compile_ext "18/pty", :deps => ["Makefile"],
- :dir => "lib/18/pty/ext",
- :env => "-X18"
-compile_ext "19/pty", :deps => ["Makefile"],
- :dir => "lib/19/pty/ext",
- :env => "-X19"
+if enabled_19
+ compile_ext "19/bigdecimal", :dir => "lib/19/bigdecimal/ext",
+ :deps => ["Makefile", "extconf.rb"],
+ :env => "-X19"
+ compile_ext "19/nkf", :dir => "lib/19/nkf/ext",
+ :deps => ["Makefile", "extconf.rb"],
+ :env => "-X19"
+ if BUILD_CONFIG[:readline] == :c_readline
+ compile_ext "19/readline", :dir => "lib/19/readline/ext",
+ :deps => ["Makefile", "extconf.rb"],
+ :env => "-X19"
+ end
+
+ if BUILD_CONFIG[:libyaml]
+ compile_ext "19/psych", :deps => ["Makefile"], :dir => "lib/19/psych/ext", :env => "-X19"
+ end
+
+ compile_ext "19/syck", :deps => ["Makefile"], :dir => "lib/19/syck/ext", :env => "-X19"
+
+ compile_ext "json/parser", :deps => ["Makefile", "extconf.rb"],
+ :dir => "lib/19/json/ext/parser",
+ :env => "-X19"
+ compile_ext "json/generator", :deps => ["Makefile", "extconf.rb"],
+ :dir => "lib/19/json/ext/generator",
+ :env => "-X19"
+
+ compile_ext "19/openssl", :deps => ["Makefile", "extconf.h"],
+ :dir => "lib/19/openssl/ext",
+ :env => "-X19"
+ compile_ext "19/pty", :deps => ["Makefile"],
+ :dir => "lib/19/pty/ext",
+ :env => "-X19"
+end
compile_ext "dbm", :ignore_fail => true, :deps => ["Makefile"], :dir => "lib/dbm/ext"
compile_ext "gdbm", :ignore_fail => true, :deps => ["Makefile"], :dir => "lib/gdbm/ext"
Please sign in to comment.
Something went wrong with that request. Please try again.