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. Also, create a new user kde-devel as explained here.
Log into your new user and untar the kdesvn-build tarball to your home folder. Now, use the sample buildrc file to create your buildrc file.
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!