File: gen-dotty.pl

package info (click to toggle)
cdbs 0.4.130
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 1,348 kB
  • sloc: sh: 4,534; xml: 2,159; makefile: 178; perl: 138; python: 94; ansic: 7; java: 5
file content (17 lines) | stat: -rw-r--r-- 279 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use File::Basename;

print "digraph deps {\n";
foreach (@ARGV) {
	$from = basename($_);
	open(FILE, $_) or die;
	while (<FILE>) {
		if (m!^include.+/([-a-z]+\.mk)!) {
			$to = basename($1);
			print "\"$from\" -> \"$to\";\n";
		}
	}
	close(FILE);
}
print "}\n";