diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-02-04 16:35:44 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-02-04 16:35:44 +0900 |
commit | c40b0d52be00f305fe14b4c060599afeded9b83e () | |
tree | ce09f2aaaa5dc034f639fdcd893d95c96037ed05 /ext/extmk.rb | |
parent | bc79229be9d3333083b2e587d708b5d791d23608 (diff) |
Glob with base option
When ripping the base directory off the result names.
-rwxr-xr-x | ext/extmk.rb | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -104,7 +104,7 @@ def extract_makefile(makefile, keep = true) end return false end - srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")].map {|fn| File.basename(fn)}.sort if !srcs.empty? old_srcs = m[/^ORIG_SRCS[ \t]*=[ \t](.*)/, 1] or return false (old_srcs.split - srcs).empty? or return false @@ -507,10 +507,8 @@ cond = proc {|ext, *| } ($extension || %w[*]).each do |e| e = e.sub(/\A(?:\.\/)+/, '') - incl, excl = Dir.glob("#{ext_prefix}/#{e}/**/extconf.rb").collect {|d| - d = File.dirname(d) - d.slice!(0, ext_prefix.length + 1) - d }.partition {|ext| with_config(ext, &cond) } @@ -522,7 +520,7 @@ cond = proc {|ext, *| exts.delete_if {|d| File.fnmatch?("-*", d)} end end -ext_prefix = ext_prefix[$top_srcdir.size+1..-2] @ext_prefix = ext_prefix @inplace = inplace |