summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/dot.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-11-14 16:22:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:47 -0500
commit8e16d8a76f8a3b8ccc89eb317c8e5daa6cf43b71 (patch)
tree8e8ccaddb94efc6a85ab6c339cab76cea1f44085 /source4/build/smb_build/dot.pm
parent7367d23713a34a6c29a492adb365292399adffe8 (diff)
downloadsamba-8e16d8a76f8a3b8ccc89eb317c8e5daa6cf43b71.tar.gz
samba-8e16d8a76f8a3b8ccc89eb317c8e5daa6cf43b71.tar.bz2
samba-8e16d8a76f8a3b8ccc89eb317c8e5daa6cf43b71.zip
r3733: More build system fixes/features:
- Use .mk files directly (no need for a SMB_*_MK() macro when adding a new SUBSYSTEM, MODULE or BINARY). This allows addition of new modules and subsystems without running configure - Add support for generating .dot files with the Samba4 dependency tree (as used by the graphviz and springgraph utilities) (This used to be commit 64826da834e26ee0488674e27a0eae36491ee179)
Diffstat (limited to 'source4/build/smb_build/dot.pm')
-rw-r--r--source4/build/smb_build/dot.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/source4/build/smb_build/dot.pm b/source4/build/smb_build/dot.pm
new file mode 100644
index 0000000000..c8720f1a8d
--- /dev/null
+++ b/source4/build/smb_build/dot.pm
@@ -0,0 +1,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;