summaryrefslogtreecommitdiff
path: root/ext/psych/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/extconf.rb')
-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 b294aabcffb..58fa359347d 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"