update for new drivers
[comedi.git] / scripts / dep.rtai
index befe75bd815a7d74d4a909a5d7aedae33e030a07..7e13864e7848c5642fe8f02e856ddf0b9629804d 100755 (executable)
@@ -3,14 +3,17 @@
 if [ "$CONFIG_RTHAL" != "" ];then
        echo You appear to be running an RTAI-patched kernel
 
-       echo -n "Enter location of RTAI source tree [/usr/src/rtai]: "
-       read RTAIDIR
-       : ${RTAIDIR:=/usr/src/rtai}
-       echo RTAIDIR=$RTAIDIR >>.sourcedirs
-       if [ -d $RTAIDIR/include/rtai ];then
-               (cd include;rm -f rtai;ln -s $RTAIDIR/include/rtai rtai)
-       else
-               (cd include;rm -f rtai;ln -s $RTAIDIR/include rtai)
+       default=${RTAIDIR:=/usr/src/rtai}
+       if [ "${interactive}" = "y" ]
+       then
+               echo -n "Enter location of RTAI source tree [${default}]: "
+               read RTAIDIR
        fi
+       : ${RTAIDIR:=${default}}
+       if [ -d ${RTAIDIR}/include ];then
+               echo RTAIDIR=$RTAIDIR >>.buildvars
+               echo CFLAGS += -I $RTAIDIR/include >>.buildvars
+       fi
+       export RTAIDIR
 fi