Allow users to pass in extra defines via make so they can
modify the build. Example

make P1022DS EXTRA_OPTS=NAND

is equivalent to

make P1022DS_NAND

Signed-off-by: Matthew McClintock <m...@freescale.com>
---
v2: Fix tab indention, fix posix compliance
v3: Move appending $EXTRA_OPTS up higher before we set $TARGETS so we
    only need to append $EXTRA_OPTS to $options and not $TARGETS

 mkconfig |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/mkconfig b/mkconfig
index 6ff533f..77ddc1b 100755
--- a/mkconfig
+++ b/mkconfig
@@ -72,9 +72,13 @@ fi
        # Check if we only have a colon...
        if [ "${tmp}" != "$7" ] ; then
                options=${7#*:}
-               TARGETS="`echo ${options} | sed 's:,: :g'` ${TARGETS}"
        fi
 }
+# Append options passed in via EXTRA_OPTS
+if [ -n "$EXTRA_OPTS" ] ; then
+       options=${options:+${options},}${EXTRA_OPTS}
+fi
+TARGETS="`echo ${options} | sed 's:,: :g'` ${TARGETS}"
 
 if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then
        echo "Failed: \$ARCH=${ARCH}, should be '${arch}' for ${BOARD_NAME}" 
1>&2
-- 
1.7.5


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to