Add build directory variables and support functions.