There is a simple and automatic way for building KDE4 using the kdesvn-build script. Download the latest release of the kdesvn-build script from http://kdesvn-build.kde.org/. Your distribution might have a package with kdesvn-build script but most probably that will be dated. So download the latest release from the website. As mentioned in the [[..|Getting Started]] page, install all the required packages for your distribution. Create a new user kde-devel and switch to that user. Untar the kdesvn-build file to your home folder.
cp kdesvn-build/kdesvn-buildrc-sample ~/.kdesvn-buildrc
Modify the .kdesvn-buildrc file for selecting which modules to compile and which to leave out.
Add kdesvn-build/ folder to your path by adding this line to your .bashrc
Now, all that remains to do is run the script!