Sha256: 644238e690178e14d9b98ada612e4fbb63e9490a2c366b6a61ca90a2718b8600

Contents?: true

Size: 1.33 KB

Versions: 35

Compression:

Stored size: 1.33 KB

Contents

# ==========================================================================
# Generator: Framework
# Copyright: ©2006-2009 Sprout Systems, Inc. and contributors
#            portions copyright ©2009 Apple Inc.
# ==========================================================================

namespace :generator do
  
  # Require a project then make sure the build root is always the project 
  # root.
  task :prepare do
    GENERATOR.requires! :target_project
    
    # if the target name has a slash in it, then we are trying to create a 
    # nested target.  extract the final part (since this is the target name)
    # and then set the build root to the parent target.
    if GENERATOR.target_name && GENERATOR.target_name =~ /\//
      parent_target_name = GENERATOR.target_name.split('/')
      GENERATOR.target_name = parent_target_name.pop
      
      parent_target_name = parent_target_name * "/"
      project = GENERATOR.target_project
      
      GENERATOR.parent_target_name = parent_target_name
      GENERATOR.parent_target = project.target_for(parent_target_name)
      GENERATOR.requires! :parent_target, :parent_target_name
      
      GENERATOR.build_root = GENERATOR.parent_target.source_root
    
    # otherwise just use project_root
    else        
      GENERATOR.build_root = GENERATOR.target_project.project_root
    end
  end
  
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
sproutit-sproutcore-1.0.20090721145285 gen/framework/Buildfile
sproutcore-1.4.4-java lib/gen/framework/Buildfile
sproutcore-1.4.4 lib/gen/framework/Buildfile
sproutcore-1.4.3.1 lib/gen/framework/Buildfile
sproutcore-1.4.3-java lib/gen/framework/Buildfile
sproutcore-1.4.3 lib/gen/framework/Buildfile
sproutcore-1.4.2-java lib/gen/framework/Buildfile
sproutcore-1.4.2 lib/gen/framework/Buildfile
sproutcore-1.4.1-java lib/gen/framework/Buildfile
sproutcore-1.4.1 lib/gen/framework/Buildfile
sproutcore-1.4.0-java lib/gen/framework/Buildfile
sproutcore-1.4.0 lib/gen/framework/Buildfile
sproutcore-1.4.0.rc.5 lib/gen/framework/Buildfile
sproutcore-1.4.0.rc.4 lib/gen/framework/Buildfile
sproutcore-1.4.0.rc.3 lib/gen/framework/Buildfile
sproutcore-1.4.0.rc.2 lib/gen/framework/Buildfile
sproutcore-1.4.0.rc gen/framework/Buildfile
sproutcore-1.0.1049.pre.2 gen/framework/Buildfile
sproutcore-1.0.1049.pre.1 gen/framework/Buildfile
sproutcore-1.0.1046 gen/framework/Buildfile