diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-29 11:09:08 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-11-29 11:09:08 +0900 |
commit | a593186a02714cb92ae2748c2b7c46a6c50b0977 (patch) | |
tree | efca5c12c6be68d55477e10ba4b0b6787e54b3c6 /ext/psych | |
parent | 98006cea4fd517671dae508fade13203bc18301a (diff) |
Nmake needs `VPATH`
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/extconf.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/psych/extconf.rb b/ext/psych/extconf.rb index a47e1dd518..fec541b453 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: |