configure.sh: Don't append the apps directory path setting if the correct setting is already in defined in the defconfig file.
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5101 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
5eb8d19522
commit
ed4164125f
|
@ -26,8 +26,8 @@ config ARCH_CHIP_LM3S8962
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "Toolchain"
|
prompt "Toolchain"
|
||||||
default LM3S_BUILDROOT
|
default LM3S_BUILDROOT
|
||||||
|
|
||||||
config LM3S_CODESOURCERYW
|
config LM3S_CODESOURCERYW
|
||||||
bool "CodeSourcery GNU toolchain under Windows"
|
bool "CodeSourcery GNU toolchain under Windows"
|
||||||
|
|
|
@ -123,8 +123,12 @@ fi
|
||||||
|
|
||||||
newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2`
|
newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2`
|
||||||
|
|
||||||
|
defappdir=y
|
||||||
if [ -z "${appdir}" ]; then
|
if [ -z "${appdir}" ]; then
|
||||||
appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2`
|
appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2`
|
||||||
|
if [ ! -z "${appdir}" ]; then
|
||||||
|
defappdir=n
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for the apps/ directory in the usual place if appdir was not provided
|
# Check for the apps/ directory in the usual place if appdir was not provided
|
||||||
|
@ -181,10 +185,13 @@ if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then
|
||||||
install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \
|
install -C "${configpath}/appconfig" "${TOPDIR}/${appdir}/.config" || \
|
||||||
{ echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; }
|
{ echo "Failed to copy ${configpath}/appconfig" ; exit 10 ; }
|
||||||
|
|
||||||
echo "" >> "${TOPDIR}/.configX"
|
if [ "X${defappdir}" = "Xy" ]; then
|
||||||
echo "# Application configuration" >> "${TOPDIR}/.configX"
|
sed -i -e "/^CONFIG_APPS_DIR/d" "${TOPDIR}/.configX"
|
||||||
echo "" >> "${TOPDIR}/.configX"
|
echo "" >> "${TOPDIR}/.configX"
|
||||||
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
|
echo "# Application configuration" >> "${TOPDIR}/.configX"
|
||||||
|
echo "" >> "${TOPDIR}/.configX"
|
||||||
|
echo "CONFIG_APPS_DIR=\"$appdir\"" >> "${TOPDIR}/.configX"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue