Commit 847e309e authored by Samuel Giddins's avatar Samuel Giddins

[PodTargetInstaller] Write custom module maps using a generator

parent d9e19706
......@@ -614,19 +614,15 @@ module Pod
def create_module_map
return super unless custom_module_map
path = target.module_map_path
path.mkpath
UI.message "- Copying module map file to #{UI.path(path)}" do
Tempfile.open(path.basename.to_s) do |tmp_module_map|
contents = custom_module_map.read
unless target.requires_frameworks?
contents.gsub!(/^(\s*)framework\s+module/, '\1module')
end
tmp_module_map.write contents
tmp_module_map.rewind
unless path.exist? && FileUtils.identical?(tmp_module_map, path)
FileUtils.cp(tmp_module_map, path)
end
generator = Generator::Constant.new(contents)
update_changed_file(generator, path)
add_file_to_support_group(path)
native_target.build_configurations.each do |c|
......@@ -635,7 +631,6 @@ module Pod
end
end
end
end
def module_map_additional_headers
return [] unless umbrella_headers_by_dir
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment