You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/12/01 07:59:36 UTC

[incubator-nuttx] 01/02: configure.sh: support custom board build with absolute path

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit b044ec5a864118fa6b71156bb452a03b1b9da47a
Author: liuhaitao <li...@xiaomi.com>
AuthorDate: Mon Nov 23 17:17:18 2020 +0800

    configure.sh: support custom board build with absolute path
    
    Also add custom board build with absolute path support in addtion
    to relative path.
    
    Change-Id: I01bcb0b79db9e245484540c714036c64234b3656
    Signed-off-by: liuhaitao <li...@xiaomi.com>
---
 tools/configure.sh | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/tools/configure.sh b/tools/configure.sh
index 5365b28..a9c2710 100755
--- a/tools/configure.sh
+++ b/tools/configure.sh
@@ -148,11 +148,14 @@ if [ ! -d ${configpath} ]; then
 
   configpath=${TOPDIR}/${boardconfig}
   if [ ! -d ${configpath} ]; then
-    echo "Directory for ${boardconfig} does not exist."
-    echo ""
-    echo "Run tools/configure.sh -L to list available configurations."
-    echo "$USAGE"
-    exit 3
+    configpath=${boardconfig}
+    if [ ! -d ${configpath} ]; then
+      echo "Directory for ${boardconfig} does not exist."
+      echo ""
+      echo "Run tools/configure.sh -L to list available configurations."
+      echo "$USAGE"
+      exit 3
+    fi
   fi
 fi
 
@@ -163,9 +166,9 @@ if [ ! -r ${src_makedefs} ]; then
   src_makedefs=${TOPDIR}/boards/*/*/${boarddir}/scripts/Make.defs
 
   if [ ! -r ${src_makedefs} ]; then
-    src_makedefs=${TOPDIR}/${boardconfig}/Make.defs
+    src_makedefs=${configpath}/Make.defs
     if [ ! -r ${src_makedefs} ]; then
-      src_makedefs=${TOPDIR}/${boardconfig}/../../scripts/Make.defs
+      src_makedefs=${configpath}/../../scripts/Make.defs
 
       if [ ! -r ${src_makedefs} ]; then
         echo "File Make.defs could not be found"