summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/dot.pl
blob: 9ecbc8a7b120e20c7d7659ba28e58b91c86f83f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/perl
# Samba4 Dependency Graph Generator
# (C) 2004-2005 Jelmer Vernooij <jelmer@samba.org>
# Published under the GNU GPL

use strict;
use lib 'build';
use smb_build::config_mk;

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

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

	return $res . "}\n";
}

my $INPUT = {};
smb_build::config_mk::run_config_mk($INPUT, "main.mk");

print __FILE__.": creating samba4-deps.dot\n";
open DOTTY, ">samba4-deps.dot";
print DOTTY generate($INPUT);
close DOTTY;

1;