summaryrefslogtreecommitdiffstats
path: root/bin/distdep
blob: 1a7b0addcd9f0a89ea67d04c5a77def201e6d436 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -p
# Usage: $0 [<].depend

# Takes dependency info and generates on stdout dependencies suitable for
# distribution by removing all the system include files from the list and
# removing all but the base name of other include files (since the Makefiles
# contain the logic for searching).

($h,$_)=/\s*\\/?$h.$`:("","$h\n");
s|( +/\S*)*( *)|$2?" \\\n   ":""|eg;
s|(([-\w\.]+)/)+([-\w\.]+)|\3|g;