mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 01:51:35 +08:00
configure.sh now will ignore appconfig files if CONFIG_NUTTX_NEWCONFIG is defined
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5080 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
@@ -115,6 +115,18 @@ if [ ! -r "${configpath}/defconfig" ]; then
|
||||
exit 6
|
||||
fi
|
||||
|
||||
# Extract values needed from the defconfig file. We need:
|
||||
# (1) The CONFIG_NUTTX_NEWCONFIG setting to know if this is a "new" style
|
||||
# configuration, and
|
||||
# (2) The CONFIG_APPS_DIR to see if there is a configured location for the
|
||||
# application directory.
|
||||
|
||||
newconfig=`grep CONFIG_NUTTX_NEWCONFIG= "${configpath}/defconfig" | cut -d'=' -f2`
|
||||
|
||||
if [ -z "${appdir}" ]; then
|
||||
appdir=`grep CONFIG_APPS_DIR= "${configpath}/defconfig" | cut -d'=' -f2`
|
||||
fi
|
||||
|
||||
# Check for the apps/ dir in the usual place if appdir was not provided
|
||||
|
||||
if [ -z "${appdir}" ]; then
|
||||
@@ -150,9 +162,11 @@ chmod 755 "${TOPDIR}/setenv.sh"
|
||||
install -C "${configpath}/defconfig" "${TOPDIR}/.configX" || \
|
||||
{ echo "Failed to copy ${configpath}/defconfig" ; exit 9 ; }
|
||||
|
||||
# Copy option appconfig
|
||||
# Copy appconfig file. The appconfig file will be copied to ${appdir}/.config
|
||||
# if both (1) ${appdir} is defined and (2) we are not using the new configuration
|
||||
# (which does not require a .config file in the appsdir.
|
||||
|
||||
if [ ! -z "${appdir}" ]; then
|
||||
if [ ! -z "${appdir}" -a "X${newconfig}" != "Xy" ]; then
|
||||
if [ ! -r "${configpath}/appconfig" ]; then
|
||||
echo "NOTE: No readable appconfig file found in ${configpath}"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user