Ignore .exe files in whitespace test
[coreboot.git] / util / lint / lint-001-no-global-config-in-romstage
old mode 100644 (file)
new mode 100755 (executable)
index 3bb71f8..0c6f403
@@ -1,9 +1,28 @@
 #!/bin/sh
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2010 coresystems GmbH
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# DESCR: Check that no symbol #defined in any romstage.c is used elsewhere
+
 DEFINES=`grep "#define" src/mainboard/*/*/romstage.c |sed 's,.*#define[\t ]\([^\t ]*\)[\t ].*,\1,' | grep -v "(" | sort -u`
 SCANBUCKET=`mktemp`
 LC_ALL=C export LC_ALL
 find src -name .svn -type d -prune -o -name mainboard -type d -prune -o -name examples -type d -prune -o -type f -exec sed -nf `dirname $0`/remccoms3.sed {} + > $SCANBUCKET
+
 for define in $DEFINES; do
        if [ `egrep -c "([^_A-Za-z0-9]$define[^_A-Za-z0-9]|^$define[^_A-Za-z0-9]|[^_A-Za-z0-9]$define\$)" $SCANBUCKET` -gt 0 ]; then
                echo "$define is defined in mainboard(s) and used elsewhere"