summaryrefslogtreecommitdiff
path: root/source4/build/smb_build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build')
-rwxr-xr-xsource4/build/smb_build/dot.pl32
-rw-r--r--source4/build/smb_build/dot.pm23
-rw-r--r--source4/build/smb_build/main.pl5
3 files changed, 32 insertions, 28 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;
diff --git a/source4/build/smb_build/dot.pm b/source4/build/smb_build/dot.pm
deleted file mode 100644
index c8720f1a8d..0000000000
--- a/source4/build/smb_build/dot.pm
+++ /dev/null
@@ -1,23 +0,0 @@
-# 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;
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 1bc4d45aaa..4c42c7a7c1 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -12,7 +12,6 @@ use smb_build::smb_build_h;
use smb_build::input;
use smb_build::config_mk;
use smb_build::output;
-use smb_build::dot;
use smb_build::env;
use config;
use strict;
@@ -72,8 +71,4 @@ $mkenv->ProtoHeader($OUTPUT->{ALL_OBJS});
$mkenv->write("Makefile");
smb_build_h::create_smb_build_h($OUTPUT, "include/smb_build.h");
-open DOTTY, ">samba4-deps.dot";
-print DOTTY dot::generate($DEPEND);
-close DOTTY;
-
1;