tools/tesbuild.sh will now build NxWM configurations
This commit is contained in:
parent
37dd4e52a1
commit
f36e342f38
@ -34,22 +34,27 @@
|
|||||||
|
|
||||||
WD=$PWD
|
WD=$PWD
|
||||||
nuttx=$WD/../nuttx
|
nuttx=$WD/../nuttx
|
||||||
|
UNLINK=./unlink.sh
|
||||||
|
|
||||||
progname=$0
|
progname=$0
|
||||||
host=linux
|
host=linux
|
||||||
wenv=cygwin
|
wenv=cygwin
|
||||||
sizet=uint
|
sizet=uint
|
||||||
|
APPSDIR=../apps
|
||||||
|
NXWDIR=../NxWidgets
|
||||||
unset testfile
|
unset testfile
|
||||||
|
|
||||||
function showusage {
|
function showusage {
|
||||||
echo ""
|
echo ""
|
||||||
echo "USAGE: $progname [-w|l] [-c|n] [-s] <testlist-file>"
|
echo "USAGE: $progname [-w|l] [-c|n] [-s] [-a <appsdir>] [-n <nxdir>] <testlist-file>"
|
||||||
echo " $progname -h"
|
echo " $progname -h"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Where:"
|
echo "Where:"
|
||||||
echo " -w|l selects Windows (w) or Linux (l). Default: Linux"
|
echo " -w|l selects Windows (w) or Linux (l). Default: Linux"
|
||||||
echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin"
|
echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin"
|
||||||
echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int"
|
echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int"
|
||||||
|
echo " -a <appdirs> provides the relative path to the apps/ directory. Default ../apps"
|
||||||
|
echo " -n <nxdir> provides the relative path to the NxWidgets/ directory. Default ../NxWidgets"
|
||||||
echo " -h will show this help test and terminate"
|
echo " -h will show this help test and terminate"
|
||||||
echo " <testlist-file> selects the list of configurations to test. No default"
|
echo " <testlist-file> selects the list of configurations to test. No default"
|
||||||
echo ""
|
echo ""
|
||||||
@ -78,6 +83,14 @@ while [ ! -z "$1" ]; do
|
|||||||
-s )
|
-s )
|
||||||
sizet=long
|
sizet=long
|
||||||
;;
|
;;
|
||||||
|
-a )
|
||||||
|
shift
|
||||||
|
APPSDIR="$1"
|
||||||
|
;;
|
||||||
|
-n )
|
||||||
|
shift
|
||||||
|
NXWDIR="$1"
|
||||||
|
;;
|
||||||
-h )
|
-h )
|
||||||
showusage
|
showusage
|
||||||
;;
|
;;
|
||||||
@ -122,6 +135,15 @@ function distclean {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if build is NxWM and clean
|
||||||
|
|
||||||
|
function nxcheck {
|
||||||
|
unset nxconfig
|
||||||
|
if [ -d $NXWDIR ]; then
|
||||||
|
nxconfig=`grep CONFIG_NXWM=y $nuttx/.config`
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Configure for the next build
|
# Configure for the next build
|
||||||
|
|
||||||
function configure {
|
function configure {
|
||||||
@ -196,6 +218,33 @@ function configure {
|
|||||||
make olddefconfig 1>/dev/null 2>&1
|
make olddefconfig 1>/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Build the NxWidgets libraries
|
||||||
|
|
||||||
|
function nxbuild {
|
||||||
|
if [ -e $APPSDIR/internal ]; then
|
||||||
|
$UNLINK $APPSDIR/internal
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$nxconfig" ]; then
|
||||||
|
echo " Building NxWidgets..."
|
||||||
|
echo "------------------------------------------------------------------------------------"
|
||||||
|
|
||||||
|
cd $nuttx/$NXTOOLS || { echo "Failed to CD to $NXTOOLS"; exit 1; }
|
||||||
|
./install.sh $nuttx/$APPSDIR nxwm 1>/dev/null
|
||||||
|
|
||||||
|
cd $nuttx || { echo "Failed to CD to $nuttx"; exit 1; }
|
||||||
|
make -i context 1>/dev/null
|
||||||
|
|
||||||
|
cd $nuttx/$NXWIDGETSDIR || { echo "Failed to CD to $NXWIDGETSDIR"; exit 1; }
|
||||||
|
make -i TOPDIR=$nuttx clean 1>/dev/null
|
||||||
|
make -i TOPDIR=$nuttx 1>/dev/null
|
||||||
|
|
||||||
|
cd $nuttx/$NXWMDIR || { echo "Failed to CD to $NXWMDIR"; exit 1; }
|
||||||
|
make -i TOPDIR=$nuttx clean 1>/dev/null
|
||||||
|
make -i TOPDIR=$nuttx 1>/dev/null
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Perform the next build
|
# Perform the next build
|
||||||
|
|
||||||
function build {
|
function build {
|
||||||
@ -209,14 +258,27 @@ function build {
|
|||||||
|
|
||||||
function dotest {
|
function dotest {
|
||||||
echo "------------------------------------------------------------------------------------"
|
echo "------------------------------------------------------------------------------------"
|
||||||
|
nxcheck
|
||||||
distclean
|
distclean
|
||||||
configure
|
configure
|
||||||
|
nxbuild
|
||||||
build
|
build
|
||||||
}
|
}
|
||||||
|
|
||||||
# Perform the build test for each entry in the test list file
|
# Perform the build test for each entry in the test list file
|
||||||
|
|
||||||
export APPSDIR=../apps
|
if [ ! -d $APPSDIR ]; then
|
||||||
|
export "ERROR: No directory found at $APPSDIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export APPSDIR
|
||||||
|
|
||||||
|
if [ -d $NXWDIR ]; then
|
||||||
|
NXWIDGETSDIR=$NXWDIR/libnxwidgets
|
||||||
|
NXWMDIR=$NXWDIR/nxwm
|
||||||
|
NXTOOLS=$NXWDIR/tools
|
||||||
|
fi
|
||||||
|
|
||||||
# Shouldn't have to do this
|
# Shouldn't have to do this
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user