if [ "$CONFIG_RTHAL" != "" ];then
echo You appear to be running an RTAI-patched kernel
- if [ "$RTAIDIR" = "" ]
+ default=${RTAIDIR:=/usr/src/rtai}
+ if [ "${interactive}" = "y" ]
then
- echo -n "Enter location of RTAI source tree [/usr/src/rtai]: "
+ echo -n "Enter location of RTAI source tree [${default}]: "
read RTAIDIR
- : ${RTAIDIR:=/usr/src/rtai}
fi
- echo RTAIDIR=$RTAIDIR >>.sourcedirs
- (cd include;rm -f rtai;ln -s $RTAIDIR/include rtai)
+ : ${RTAIDIR:=${default}}
+ if [ -d ${RTAIDIR}/include ];then
+ echo RTAIDIR=$RTAIDIR >>.buildvars
+ echo CFLAGS += -I $RTAIDIR/include >>.buildvars
+ fi
+ export RTAIDIR
fi