+# Find the files that contain the string
+# NOTEST <cpu target>
+# or
+# NOTEST all
+# and put them in a list
+
+NOTEST="notest:"
+for src in $SRC_ALL ;
+do
+ grep -P "$NOTEST\s*$CPU_TARGET" $src 2>&1 > /dev/null
+ if [ $? -eq 0 ] ; then
+ EXCLUDE_LIST="$EXCLUDE_LIST $src"
+ fi
+ grep -P "$NOTEST\s*all" $src 2>&1 > /dev/null
+ if [ $? -eq 0 ] ; then
+ EXCLUDE_LIST="$EXCLUDE_LIST $src"
+ fi
+done
+
+# Remove the exclude list files from the sources to be
+# compiled
+for src in $EXCLUDE_LIST ;
+do
+ SRC_ALL=`echo $SRC_ALL | sed -e "s;$src;;g"`
+done