summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-28 05:52:11 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-11-28 05:52:11 +0000
commit1ff0a3d0c66e89f4c920e67813d604a6bb933fac (patch)
treef1d06bf6a1def23adff84d51e1241359e42948d3 /ext
parent835d24f637e7616787e369ae4bf7edd0f8302a3d (diff)
* ext/psych/extconf.rb: copy sources into build directory,
not into srcdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/extconf.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index b294aabcff..58fa359347 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -11,11 +11,16 @@ unless find_header('yaml.h') && find_library('yaml', 'yaml_get_version')
srcdir = File.expand_path File.dirname __FILE__
files = Dir.chdir File.join(srcdir, 'yaml') do
Dir.entries(Dir.pwd).find_all { |f|
- File.file?(f) && File.extname(f) =~ /^\.[hc]/
+ File.file?(f) && /^\.[hc]/ =~ File.extname(f)
}.map { |f| File.expand_path f }
end
- FileUtils.cp_r files, srcdir
+ dstdir = Dir.pwd
+ FileUtils.cp_r files, dstdir
+
+ $objs = (Dir.glob(File.join(File.dirname(__FILE__), '*.c')) + Dir.glob('*.c')).map{|f|
+ File.basename(f, '.c') + ".#{$OBJEXT}"
+ }
if $mswin
$CFLAGS += " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"