class Xcake::Command::Make

Public Instance Methods

run() click to toggle source
# File lib/xcake/command/make.rb, line 7
def run
  file_path = "#{Dir.pwd}/Cakefile"

  raise Xcake::Informative, "Couldn't find Cakefile" unless File.exist?(file_path)

  EventHooks.run_hook :before_cakefile_read
  file_contents = File.read(file_path)

  project = Project.new
  project.instance_eval(file_contents, file_path)

  context = XcodeprojContext.new

  dependency_provider = DependencyProvider.new(Generator)
  dependency_provider.tsort.each do |g|
    generator = g.new(context)
    project.accept(generator)
  end
end