File: gen-dotty.pl

package info (click to toggle)
cdbs 0.4.52
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,032 kB
  • ctags: 55
  • sloc: sh: 4,535; xml: 2,075; makefile: 157; perl: 64; python: 16; 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";