summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/dot.pm
blob: c8720f1a8de08495cf3549fc73b821022a42f73f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Samba4 Dependency Graph Generator
# (C) 2004 Jelmer Vernooij <jelmer@samba.org>
# Published under the GNU GPL

package dot;
use strict;

sub generate($)
{
	my $depend = shift;
	my $res = "digraph samba4 {\n";

	foreach my $part (values %{$depend}) {
		foreach my $elem (@{$part->{DEPENDENCIES}}) {
			next if $part == $elem;
			$res .= "\t\"$part->{NAME}\" -> \"$$elem->{NAME}\";\n";
		}
	}

	return $res . "}\n";
}

1;