diff options
author | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-02-06 00:39:31 +0000 |
---|---|---|
committer | schnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2004-02-06 00:39:31 +0000 |
commit | da96660e9d0900201cb6ab4531e6b76a4694bfa8 (patch) | |
tree | f5f7e2d85ef57c86a81219ef4a76aacafee44bed /lib | |
parent | 460d771abe32c94b2590d84de75e1cec28b30860 (diff) |
Put braces onto extra lines to follow the coding conventions.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3569 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/sbin/f_depend_modules.pl | 58 |
1 files changed, 40 insertions, 18 deletions
diff --git a/lib/sbin/f_depend_modules.pl b/lib/sbin/f_depend_modules.pl index 1ca907f1..e7565dc5 100755 --- a/lib/sbin/f_depend_modules.pl +++ b/lib/sbin/f_depend_modules.pl @@ -26,46 +26,64 @@ print "$dest:"; my %modules; my $line = 0; -while (<STDIN>) { +while (<STDIN>) +{ ++ $line; - if (/^\s*#\s*(\d+)/) { + if (/^\s*#\s*(\d+)/) + { # line number directive from C preprocessor $line = $1 - 1; - } elsif (/^\s*include\s*['"]([^'"]+)['"]/i) { + } + elsif (/^\s*include\s*['"]([^'"]+)['"]/i) + { # include statement my $name = $1; print " \\\n $srcdir/$name"; - } elsif (/^\s*module\s+(\w+)/i) { + } + elsif (/^\s*module\s+(\w+)/i) + { # begin of a module my $name = $1; $modules{$name} = 1; - } elsif (/^\s*use\s+(\w+)/i) { + } + elsif (/^\s*use\s+(\w+)/i) + { # use statement my $name = $1; my $found = 0; - if (! $found) { + if (! $found) + { # reference to a module in this file? - if ($modules{$name}) { + if ($modules{$name}) + { $found = 1; } } - if (! $found) { + if (! $found) + { # reference to a module in this thorn? - loop: foreach my $suffix (@suffixes) { - if (-e "$srcdir/$name$suffix") { + loop: foreach my $suffix (@suffixes) + { + if (-e "$srcdir/$name$suffix") + { $found = 1; print " \\\n $name$suffix.o"; last loop; } } } - if (! $found) { + if (! $found) + { # reference to a module in another thorn? - loop: foreach my $dir (@otherdirs) { + loop: foreach my $dir (@otherdirs) + { # note: we could also use the SUBDIRS from the make.code.defn here - foreach my $subdir (".", "include") { - foreach my $suffix (@suffixes) { - if (-e "$dir/$subdir/$name$suffix.o") { + foreach my $subdir (".", "include") + { + foreach my $suffix (@suffixes) + { + if (-e "$dir/$subdir/$name$suffix.o") + { $found = 1; print " \\\n $dir/$subdir/$name$suffix.o"; last loop; @@ -74,11 +92,15 @@ while (<STDIN>) { } } } - if (! $found) { + if (! $found) + { print STDERR "$srcfile:$line: Warning: While tracing module depencencies: Source file for module \"$name\" not found\n"; - if (@otherdirs) { + if (@otherdirs) + { print STDERR " Searched in thorn directory and in [" . join(', ', @otherdirs) . "]\n"; - } else { + } + else + { print STDERR " Searched in thorn directory only.\n"; } } |