mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
build system: handle OS-specific source file names everywhere
…and not just in the src/mkvtoolnix-gui sub-directory.
This commit is contained in:
parent
589af4f0b7
commit
d1cd5f2ffe
@ -77,7 +77,7 @@ class Target
|
||||
list = list.collect { |e| e.respond_to?(:to_a) ? e.to_a : e }.flatten
|
||||
file_mode = (options[:type] || :file) == :file
|
||||
except = !file_mode && options[:except].is_a?(Array) ? options[:except].collect { |file| list.collect { |dir| "#{dir}/#{file}" } }.flatten.to_hash_by : {}
|
||||
new_sources = list.collect { |entry| file_mode ? (entry.respond_to?(:to_a) ? entry.to_a : entry) : FileList["#{entry}/*.c", "#{entry}/*.cpp", "#{entry}/*.cc"].to_a }.flatten.select { |file| !except[file] }
|
||||
new_sources = list.collect { |entry| file_mode ? (entry.respond_to?(:to_a) ? entry.to_a : entry) : FileList["#{entry}/*.c", "#{entry}/*.cpp", "#{entry}/*.cc"].to_a }.flatten.select { |file| !except[file] }.for_target!
|
||||
new_deps = new_sources.collect { |file| [ file.ext(ext_map[ file.pathmap('%x') ] || 'o'), file ] }
|
||||
new_file_deps = new_deps.reject { |src, tgt| no_file_deps_re.match src }
|
||||
new_file_deps += new_sources.select { |file| %r{\.moc$}.match file }.map { |file| [ file, file.ext('h') ] }
|
||||
|
Loading…
Reference in New Issue
Block a user