File: gen-dotty.pl

package info (click to toggle)
cdbs 0.4.182
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 624 kB
  • sloc: xml: 2,137; sh: 676; perl: 296; makefile: 103
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";