Debian Codegraph @

debian/tests/include-test

raw
1 #!/bin/sh
2
3 set -e
4
5 # Make sure the libdwarf headers and library are installed and usable
6
7 if [ -n "${DEB_HOST_GNU_TYPE:-}" ]; then
8 CROSS_COMPILE="$DEB_HOST_GNU_TYPE-"
9 else
10 CROSS_COMPILE=
11 fi
12
13 TMPDIR=$(mktemp -d)
14 trap "rm -rf $TMPDIR" EXIT
15 cd $TMPDIR
16
17 cat <<EOF > test-include.c
18 #include <libdwarf/dwarf.h>
19 #include <libdwarf/libdwarf.h>
20 int main () { return 0; }
21 EOF
22
23 ${CROSS_COMPILE}gcc -o test-include test-include.c -ldwarf
24 [ -x test-include ]
25 ./test-include