summaryrefslogtreecommitdiffstats
path: root/source4/build/smb_build/dot.pl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-10-28 23:28:37 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:30 -0500
commitfc6bdfa8be1d47f4a699efc70e7129ae7168adbd (patch)
tree758dce40d6a4506cd28168b9efb8ab8beb5446e9 /source4/build/smb_build/dot.pl
parent3f2136b9190fe8035ebba7514ad136f390081c1f (diff)
downloadsamba-fc6bdfa8be1d47f4a699efc70e7129ae7168adbd.tar.gz
samba-fc6bdfa8be1d47f4a699efc70e7129ae7168adbd.tar.xz
samba-fc6bdfa8be1d47f4a699efc70e7129ae7168adbd.zip
r11388: Move dot-generating to a seperate perl executable
(This used to be commit 31406f7aa540efc4c11e7546a12fdeee80e8db6c)
Diffstat (limited to 'source4/build/smb_build/dot.pl')
-rwxr-xr-xsource4/build/smb_build/dot.pl32
1 files changed, 32 insertions, 0 deletions
diff --git a/source4/build/smb_build/dot.pl b/source4/build/smb_build/dot.pl
new file mode 100755
index 0000000000..ccf098722f
--- /dev/null
+++ b/source4/build/smb_build/dot.pl
@@ -0,0 +1,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";
+open DOTTY, ">samba4-deps.dot";
+print DOTTY generate($INPUT);
+close DOTTY;
+
+1;