summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-11-29 11:09:08 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-06-05 09:06:35 +0900
commit4f28ac8c95b6b24d5c0c56fbb998aff34457d840 (patch)
tree0135246375ab9bba69b0a96e97f8c858bd28df0c /ext
parent351db1927ce1b8360106ca00eb3e72889cf38a84 (diff)
downloadpsych-4f28ac8c95b6b24d5c0c56fbb998aff34457d840.tar.gz
Nmake needs `VPATH`
ruby/ruby@a593186a02714cb92ae2748c2b7c46a6c50b0977
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/extconf.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb
index a47e1dd..fec541b 100644
--- a/ext/psych/extconf.rb
+++ b/ext/psych/extconf.rb
@@ -15,8 +15,10 @@ if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_li
$srcs = Dir.glob("#{$srcdir}/{,yaml/}*.c").map {|n| File.basename(n)}.sort
+ header = 'yaml/yaml.h'
if have_macro("_WIN32")
$CPPFLAGS << " -DYAML_DECLARE_STATIC -DHAVE_CONFIG_H"
+ header = "{$(VPATH)}#{header}"
end
have_header 'dlfcn.h'
@@ -32,11 +34,10 @@ if enable_config("bundled-libyaml", false) || !(find_header('yaml.h') && find_li
find_header 'yaml.h'
have_header 'config.h'
- bundled = true
end
create_makefile 'psych' do |mk|
- mk << "YAML_H =#{' yaml/yaml.h' if bundled}\n"
+ mk << "YAML_H = #{header}".strip << "\n"
end
# :startdoc: