DETECT BUILD_DIR