diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-10 19:42:35 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-09-10 19:42:35 +0000 |
commit | 62df6c560eab1508e7baf5a767918154b745b97d (patch) | |
tree | 9644400734fa684137efbd3fca7f12a369dd989c /merge-helpers | |
parent | 3505500993486eebf793d76832d3ca5bda554775 (diff) |
2009-09-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* check_bsp: Clean up check_bsp.
* Makefile: New file.
Diffstat (limited to 'merge-helpers')
-rw-r--r-- | merge-helpers/ChangeLog | 5 | ||||
-rw-r--r-- | merge-helpers/Makefile | 20 | ||||
-rwxr-xr-x | merge-helpers/check_bsp | 36 |
3 files changed, 54 insertions, 7 deletions
diff --git a/merge-helpers/ChangeLog b/merge-helpers/ChangeLog index 2c58dbb..48bcd66 100644 --- a/merge-helpers/ChangeLog +++ b/merge-helpers/ChangeLog @@ -1,5 +1,10 @@ 2009-09-10 Joel Sherrill <joel.sherrill@oarcorp.com> + * check_bsp: Clean up check_bsp. + * Makefile: New file. + +2009-09-10 Joel Sherrill <joel.sherrill@oarcorp.com> + * check_bsp: Fix comment. 2009-07-16 Joel Sherrill <joel.sherrill@oarcorp.com> diff --git a/merge-helpers/Makefile b/merge-helpers/Makefile new file mode 100644 index 0000000..5f7a659 --- /dev/null +++ b/merge-helpers/Makefile @@ -0,0 +1,20 @@ +# +# $Id$ +# + +INSTALL_DIR=../bin +SCRIPTS=check_bsp + +all: prep ${SCRIPTS} install + +prep: + test -d ${INSTALL_DIR} || mkdir ${INSTALL_DIR} + +clean: + +install: + for i in ${SCRIPTS} ; do \ + cp $${i} ${INSTALL_DIR}/$${i} ; \ + chmod +x ${INSTALL_DIR}/$${i} ; \ + done + diff --git a/merge-helpers/check_bsp b/merge-helpers/check_bsp index f72008a..5ce6ce6 100755 --- a/merge-helpers/check_bsp +++ b/merge-helpers/check_bsp @@ -33,27 +33,33 @@ test_its_there() fi grep ${2} ${1} >/dev/null if [ $? -ne 0 ] ; then - echo ${2} is NOT in ${bspdir}/${1} + echo NOT in ${bspdir}/${1} fi } test_its_NOT_there() { - if [ $# -ne 2 ] ; then + if [ $# -lt 2 ] ; then echo Usage: $0 FILE pattern fi - grep ${2} ${1} >/dev/null + FILE=$1 + shift + grep "${*}" ${FILE} >/dev/null if [ $? -eq 0 ] ; then - echo ${2} SHOULD NOT BE IN ${bspdir}/${1} + echo SHOULD NOT BE IN ${bspdir}/${FILE} fi } -test_its_there configure.ac RTEMS_BSP_BOOTCARD_OPTIONS -test_its_there configure.ac RTEMS_BSP_CLEANUP_OPTIONS +if [ -r configure.ac ] ; then + echo "=== Checking for options in BSP configure.ac" + test_its_there configure.ac RTEMS_BSP_BOOTCARD_OPTIONS + test_its_there configure.ac RTEMS_BSP_CLEANUP_OPTIONS +fi # really need to make the copyright strings consistent in BSPs +echo "=== Checking for copyright notices" find . -name "*.[chS]" | while read f do grep -i COPYRIGHT ${f} >/dev/null @@ -63,15 +69,31 @@ do done # We want CVS Id strings everywhere possible +echo "=== Checking for CVS Id strings" find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f do test_its_there ${f} "\$Id" done -# We do not want printf or puts in a BSP +# We do not want printf in a BSP +echo "=== Checking for printf" find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f do test_its_NOT_there ${f} printf +done + +# We do not want puts in a BSP +echo "=== Checking for puts" +find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f +do test_its_NOT_there ${f} puts done +# We do not want the reformatted license notice +echo "=== Checking for reformatted RTEMS license notices" +find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f +do + test_its_NOT_there ${f} "this file may be found in the file" +done + +exit 0 |