tools/configure.sh: This commit adds a -m option for macOS. For anyone not aware, Apple renamed OSX to macOS recently; thus the 'm' instead of 'o'. This does not change the other uses of *_OSX to macOS.

This commit is contained in:
jeditekunum
2017-11-09 17:11:59 -06:00
committed by Gregory Nutt
parent efd798661a
commit 7b3fc03f65
+41 -27
View File
@@ -36,14 +36,16 @@ WD=`test -d ${0%/*} && cd ${0%/*}; pwd`
TOPDIR="${WD}/.." TOPDIR="${WD}/.."
USAGE=" USAGE="
USAGE: ${0} [-d] [-l|c|u|n] [-a <app-dir>] <board-name>/<config-name> USAGE: ${0} [-d] [-l|m|c|u|n] [-a <app-dir>] <board-name>/<config-name>
Where: Where:
-l selects the Linux (l) host environment. The [-c|u|n] options -l selects the Linux (l) host environment.
select one of the Windows environments. Default: Use host setup -m selects the macOS (m) host environment.
in the defconfig file -c selects the Windows host and Cygwin (c) environment.
[-c|u|n] selects the Windows host and a Windows environment: Cygwin (c), -u selects the Windows host and Ubuntu under Windows 10 (u) environment.
Ubuntu under Windows 10 (u), or Windows native (n). Default Cygwin -n selects the Windows host and Windows native (n) environment.
Default: Use host setup in the defconfig file
Default Windows: Cygwin
<board-name> is the name of the board in the configs directory <board-name> is the name of the board in the configs directory
<config-name> is the name of the board configuration sub-directory <config-name> is the name of the board configuration sub-directory
<app-dir> is the path to the apps/ directory, relative to the nuttx <app-dir> is the path to the apps/ directory, relative to the nuttx
@@ -86,6 +88,9 @@ while [ ! -z "$1" ]; do
-l ) -l )
host=linux host=linux
;; ;;
-m )
host=macos
;;
-n ) -n )
host=windows host=windows
wenv=native wenv=native
@@ -279,31 +284,40 @@ if [ ! -z "$host" ]; then
sed -i -e "/CONFIG_SIM_X8664_SYSTEMV/d" ${dest_config} sed -i -e "/CONFIG_SIM_X8664_SYSTEMV/d" ${dest_config}
sed -i -e "/CONFIG_SIM_M32/d" ${dest_config} sed -i -e "/CONFIG_SIM_M32/d" ${dest_config}
if [ "$host" == "linux" ]; then case "$host" in
echo " Select CONFIG_HOST_LINUX=y" "linux")
echo "CONFIG_HOST_LINUX=y" >> "${dest_config}" echo " Select CONFIG_HOST_LINUX=y"
echo "CONFIG_SIM_X8664_SYSTEMV=y" >> "${dest_config}" echo "CONFIG_HOST_LINUX=y" >> "${dest_config}"
echo "CONFIG_SIM_X8664_SYSTEMV=y" >> "${dest_config}"
;;
else "macos")
echo " Select CONFIG_HOST_WINDOWS=y" echo " Select CONFIG_HOST_OSX=y"
echo "CONFIG_HOST_WINDOWS=y" >> "${dest_config}" echo "CONFIG_HOST_OSX=y" >> "${dest_config}"
echo "CONFIG_SIM_X8664_MICROSOFT=y" >> "${dest_config}" ;;
if [ "X$wenv" == "Xcygwin" ]; then "windows")
echo " Select CONFIG_WINDOWS_CYGWIN=y" echo " Select CONFIG_HOST_WINDOWS=y"
echo "CONFIG_WINDOWS_CYGWIN=y" >> "${dest_config}" echo "CONFIG_HOST_WINDOWS=y" >> "${dest_config}"
echo "CONFIG_SIM_X8664_MICROSOFT=y" >> "${dest_config}"
else case "$wenv" in
if [ "X$wenv" == "Xubuntu" ]; then "cygwin")
echo " Select CONFIG_WINDOWS_UBUNTU=y" echo " Select CONFIG_WINDOWS_CYGWIN=y"
echo "CONFIG_WINDOWS_UBUNTU=y" >> "${dest_config}" echo "CONFIG_WINDOWS_CYGWIN=y" >> "${dest_config}"
;;
else "ubuntu")
echo " Select CONFIG_WINDOWS_NATIVE=y" echo " Select CONFIG_WINDOWS_UBUNTU=y"
echo "CONFIG_WINDOWS_NATIVE=y" >> "${dest_config}" echo "CONFIG_WINDOWS_UBUNTU=y" >> "${dest_config}"
fi ;;
fi
fi *)
echo " Select CONFIG_WINDOWS_NATIVE=y"
echo "CONFIG_WINDOWS_NATIVE=y" >> "${dest_config}"
;;
esac
esac
fi fi
# The saved defconfig files are all in compressed format and must be # The saved defconfig files are all in compressed format and must be