diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-10-28 23:28:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:30 -0500 |
commit | fc6bdfa8be1d47f4a699efc70e7129ae7168adbd (patch) | |
tree | 758dce40d6a4506cd28168b9efb8ab8beb5446e9 /source4 | |
parent | 3f2136b9190fe8035ebba7514ad136f390081c1f (diff) | |
download | samba-fc6bdfa8be1d47f4a699efc70e7129ae7168adbd.tar.gz samba-fc6bdfa8be1d47f4a699efc70e7129ae7168adbd.tar.bz2 samba-fc6bdfa8be1d47f4a699efc70e7129ae7168adbd.zip |
r11388: Move dot-generating to a seperate perl executable
(This used to be commit 31406f7aa540efc4c11e7546a12fdeee80e8db6c)
Diffstat (limited to 'source4')
-rwxr-xr-x | source4/build/smb_build/dot.pl | 32 | ||||
-rw-r--r-- | source4/build/smb_build/dot.pm | 23 | ||||
-rw-r--r-- | source4/build/smb_build/main.pl | 5 |
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; |