Before you build WebKit, you'll need to check out sources.
To start a build, use the build-webkit script.
It's handy to put the WebKitTools/Scripts directory in your shell path so you can type commands like build-webkit without specifying the path to the script.
Once the frameworks are built, you'll probably want to run Safari using the newly-built WebKit. To do that, use the run-safari script.
This script sets up the DYLD_FRAMEWORK_PATH environment variable, which will cause the system loader to use the frameworks you built from your Xcode build products directory instead of the ones installed in /System/Library/Frameworks, so it will start the version of Safari from the Applications directory with the WebKit frameworks you just built.
If you have specified custom location for the build products directory in Xcode preferences, the frameworks will be built in that directory. If you haven't, the build products will be put in a directory named WebKitBuild alongside the source code directories.
By default, the scripts will do a Deployment build, which is optimized and doesn't have development-only code, like assertions, compiled in. If you're prefer to do a Development build, then do execute this command:
You can also pass the configuration on the command line to any of the build commands. If you're using Xcode 2.0 you'll need to blow away your build products directory each time you switch configurations.
More information about building WebKit can be found on its wiki.
[TODO: Talk about how to replace your system WebKit.framework, and why you probably don't want to, once we have scripts that help you do that.]