lib/xot/extconf.rb in xot-0.1.30 vs lib/xot/extconf.rb in xot-0.1.31

- old
+ new

@@ -10,14 +10,14 @@ class ExtConf include Xot::Rake - attr_reader :modules, :defs, :inc_dirs, :lib_dirs, :headers, :libs, :local_libs, :frameworks + attr_reader :extensions, :defs, :inc_dirs, :lib_dirs, :headers, :libs, :local_libs, :frameworks - def initialize(*modules, &block) - @modules = modules.map {|m| m.const_get :Module} + def initialize(*extensions, &block) + @extensions = extensions.map {|x| x.const_get :Extension} @defs, @inc_dirs, @lib_dirs, @headers, @libs, @local_libs, @frameworks = ([[]] * 7).map(&:dup) Xot::BlockUtil.instance_eval_or_block_call self, &block if block end @@ -26,12 +26,12 @@ end def setup() yield if block_given? - modules.each do |m| - name = m.name.downcase + extensions.each do |x| + name = x.name.downcase headers << "#{name}.h" libs << name end local_libs << (clang? ? 'c++' : 'stdc++') @@ -42,11 +42,11 @@ $LDFLAGS = make_ldflags $LDFLAGS, lib_dirs, frameworks $LOCAL_LIBS << local_libs.map {|s| " -l#{s}"}.join end def create_makefile(*args) - modules.each do |m| - dir_config m.name.downcase, m.inc_dir, m.lib_dir + extensions.each do |x| + dir_config x.name.downcase, x.inc_dir, x.lib_dir end exit 1 unless headers.all? {|s| have_header s} exit 1 unless libs.all? {|s| have_library s, 't'}