Seems that the build system is quite fragile and a pain to use. Rather than reinventing the wheel why not use something more robust like e.g. autotools. Specific issues are: - Configure script does not seem to like it when the source is not in the destination tree.. though that's supposed to be supported.. you get a bad build if you try it. - If you make an error with Configure you pretty much have to wipe the entire destination and source tree and start from scratch.
There're plans to evolve the current build system towards the use of a different tool. At the moment Configure remains the supported system.