pivotal/cedar — pull request #32 by mhaylock (2012-03-01 11:02:39+00:00)
Title: Support the inclusion of the Rakefile inside of another Rakefile

I have a project where I store the Cedar source in the relative path `Externals/Cedar` as a git submodule. I wanted to reuse the tasks in the Rakefile that comes with the Cedar source in my own so I can have a Rakefile that looks something like this:

```ruby
PROJECT_NAME = "Example"
APP_NAME = "Example"
CONFIGURATION = "Debug"

OCUNIT_APPLICATION_SPECS_TARGET_NAME = "ExampleTests"

SDK_VERSION = "5.1"
SDK_DIR = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator#{SDK_VERSION}.sdk"
BUILD_DIR = "/tmp/build"

IDE_BUNDLE_INJECTION = "/Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/IDEBundleInjection.framework/IDEBundleInjection"

task :default => ["ocunit:application"]

load('Externals/Cedar/Rakefile')

```

By doing things this way I'm not duplicating code from the Cedar Rakefile but I still have some configuration available to me.

I had to modify the Cedar Rakefile to support overriding the constants, I also needed to extract `IDE_BUNDLE_INJECTION` out so that I could input the correct Xcode 4.3 path for my system. For good measure I also silenced the "No matching processes belonging to you were found" messages from `kill_simulator` which I found a little annoying.