diff options
| author | Ulrich Drepper <drepper@gmail.com> | 2011-07-03 14:26:29 -0400 |
|---|---|---|
| committer | Ulrich Drepper <drepper@gmail.com> | 2011-07-03 14:26:29 -0400 |
| commit | 17a21a3907cbbc731fed12eab8c50a21dc2d6ad3 (patch) | |
| tree | fcef6dd9e9571bdd544dd52401b44adda88791dc /scripts | |
| parent | d5032639a4a7e76213942f5d9c9ea20d2e35c01d (diff) | |
| parent | 5e9b6af4a9bb2aad0e1929e88b52009d14cb6831 (diff) | |
| download | glibc-17a21a3907cbbc731fed12eab8c50a21dc2d6ad3.tar.xz glibc-17a21a3907cbbc731fed12eab8c50a21dc2d6ad3.zip | |
Merge branch 'master' of ssh://sourceware.org/git/glibc
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/check-local-headers.sh | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh index d15e9a4416..b73078d364 100755 --- a/scripts/check-local-headers.sh +++ b/scripts/check-local-headers.sh @@ -1,5 +1,5 @@ #! /bin/bash -# Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc. +# Copyright (C) 2005,2007,2009,2011 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -23,18 +23,21 @@ objpfx="$2" # To avoid long paths. cd "$objpfx" - # Search all dependency files for file names in the include directory. # There are a few system headers we are known to use. -if fgrep "$includedir" */*.{o,os,oS}.d | -fgrep -v "$includedir/asm" | -fgrep -v "$includedir/linux" | -fgrep -v "$includedir/selinux" | -fgrep -v "$includedir/sys/capability.h" | -fgrep -v "$includedir/gd" | -fgrep -v "$includedir/nss3"; then - # If we found a match something is wrong. - exit 1 -fi - -exit 0 +exec ${AWK} -v includedir="$includedir" ' +BEGIN { + status = 0 + exclude = "^" includedir \ + "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h)" +} +/^[^ ]/ && $1 ~ /.*:/ { obj = $1 } +{ + for (i = 1; i <= NF; ++i) { + if ($i ~ ("^" includedir) && $i !~ exclude) { + print "***", obj, "uses", $i + status = 1 + } + } +} +END { exit status }' */*.{o,os,oS}.d |
