File: headers-system.sh

package info (click to toggle)
libbsd 0.11.3-1%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,828 kB
  • sloc: ansic: 10,518; sh: 4,329; cpp: 581; makefile: 486
file content (24 lines) | stat: -rwxr-xr-x 376 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e

run()
{
  echo "$@"
  "$@"
}

incdir="${top_srcdir}/include"

for inc in $(cd $incdir; find -name '*.h' | sort | cut -c3-); do
  cat >headers-system-gen.c <<SOURCE
#include <$inc>
int main() { return 0; }
SOURCE

  echo "testing header $inc"
  run $CC -isystem "$incdir" $CPPFLAGS headers-system-gen.c -o /dev/null
  echo

  rm -f headers-system-gen.*
done