File: check_header_deps

package info (click to toggle)
corosync 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,796 kB
  • sloc: ansic: 41,702; sh: 11,456; makefile: 569
file content (19 lines) | stat: -rwxr-xr-x 443 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh -e

cd debian

pkgs=$(grep-dctrl -sPackage -n -FSection libdevel control)

for p in $pkgs; do
    includes="$includes -I $p/usr/include"
done

for pkg in $pkgs; do
  {
    printf 'header:Depends='
    for header in $(find "$pkg" -name "*.h"); do
        gcc -MM -MT '' -E $includes $header
    done | sed "s|^:||;s|^ *||;\|^$pkg/|d;s|/.*| (= \${binary:Version}),|" | sort -u | tr '\n' ' '
    printf '\n'
  } >>"$pkg.substvars"
done