File: headers-overlay.sh

package info (click to toggle)
libbsd 0.12.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,164 kB
  • sloc: ansic: 11,116; sh: 4,734; makefile: 851; cpp: 581
file content (26 lines) | stat: -rwxr-xr-x 450 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

set -e

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

incdir="${top_srcdir}/include/bsd"
CPPFLAGS="$CPPFLAGS -DLIBBSD_OVERLAY"

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

  echo "testing header $inc"
  run $CC -isystem "$incdir" $CPPFLAGS headers-overlay-gen.c -o headers-overlay
  echo

  rm -f headers-overlay
  rm -f headers-overlay-gen*
done