]> git.ipfire.org Git - thirdparty/cups.git/blame - scripts/checkglobals
Rename "tools" to "scripts", since that's what is contained.
[thirdparty/cups.git] / scripts / checkglobals
CommitLineData
bd7854cb 1#!/bin/sh
2#
3# Check for global symbols that don't need to be made global...
4#
5
6for file in *.o; do
bd7854cb 7 functions=""
8
9 for function in `nm -g $file | grep "T " | awk '{print $3}'`; do
10 found=""
11 for file2 in *.o; do
12 if test "$file" = "$file2"; then
13 continue;
14 fi
15
16 found=`nm -g $file2 | grep $function`
17 if test "$found" != ""; then
18 break;
19 fi
20 done
21
22 if test -z "$found"; then
23 functions="$functions $function"
24 fi
25 done
26
27 if test -z "$functions"; then
75bd9771 28 echo "$file: OK"
bd7854cb 29 else
75bd9771 30 echo "$file: $functions"
bd7854cb 31 fi
32done