]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - MAKEALL
kbuild: change out-of-tree build
[karo-tx-uboot.git] / MAKEALL
diff --git a/MAKEALL b/MAKEALL
index 54b0d893a6b07482b5b4cd970030818622d6432b..d7ad51dc440f2293e38dcde602d458eaefe37858 100755 (executable)
--- a/MAKEALL
+++ b/MAKEALL
@@ -674,8 +674,6 @@ build_target() {
                output_dir="${OUTPUT_PREFIX}"
        fi
 
-       export BUILD_DIR="${output_dir}"
-
        target_arch=$(get_target_arch ${target})
        eval cross_toolchain=\$CROSS_COMPILE_`echo $target_arch | tr '[:lower:]' '[:upper:]'`
        if [ "${cross_toolchain}" ] ; then
@@ -686,6 +684,10 @@ build_target() {
            MAKE=make
        fi
 
+       if [  "${output_dir}" != "." ] ; then
+               MAKE="${MAKE} O=${output_dir}"
+       fi
+
        ${MAKE} distclean >/dev/null
        ${MAKE} -s ${target}_config