2 # This file is part of BeRTOS.
4 # Bertos is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 # As a special exception, you may use this file as part of a free software
19 # library without restriction. Specifically, if other files instantiate
20 # templates or use macros or inline functions from this file, or you compile
21 # this file and link it with other files to produce an executable, this
22 # file does not by itself cause the resulting executable to be covered by
23 # the GNU General Public License. This exception does not however
24 # invalidate any other reasons why the executable file might be covered by
25 # the GNU General Public License.
27 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
29 # Nighlty test for BeRTOS.
31 # Author Daniele Basile <asterix@develer.com>
35 COPY_DIR="./bertos.saved"
36 CPU_DIR="${BERTOS_DIR}/cpu"
39 OS_DIR="${BERTOS_DIR}/os"
40 EMUL_DIR="${BERTOS_DIR}/emul"
45 printf "You must specify a cpu target, and source file type!\n"
46 printf "EXAMPLE:\n $0 <cpu target> <source type>\n\n"
51 #Create a list of source file without a cpu specific source
52 GEN_SRC=`find . \( -name \.svn -prune -o -path $COPY_DIR -prune -o -path $CPU_DIR -prune -o -path $APP_DIR -prune -o -path $OS_DIR -prune -o -path $WIZARD_DIR -prune -o -path $EMUL_DIR -prune \) -o -name *.${2} -print | xargs`
54 #Select c and asm sources for selected cpu target
55 TRG_SRC=`find ${CPU_DIR}/$CPU_TARGET -name \.svn -prune -o -name *.${2} -print | xargs`
57 #Generate a list of all source for each cpu
58 SRC_ALL=${GEN_SRC}" "${TRG_SRC}
60 # Find the files that contain the string
61 # NOTEST <cpu target> and put it in a list
66 grep "$NOTEST\s*$CPU_TARGET" $src 2>&1 > /dev/null
67 if [ $? -eq 0 ] ; then
68 EXCLUDE_LIST="$EXCLUDE_LIST $src"
72 # Remove the exclude list files from the sources to be
74 for src in $EXCLUDE_LIST ;
76 SRC_ALL=`echo $SRC_ALL | sed -e "s;$src;;g"`