summaryrefslogtreecommitdiff
path: root/lib/sbin/f_depend_modules.pl
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-04-08 11:05:26 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>2005-04-08 11:05:26 +0000
commit080a0f2bd952fc3641a08f95d79137a1f04a0549 (patch)
tree15c665e024eaa860dffcd7c01ba623cf986f651d /lib/sbin/f_depend_modules.pl
parent319906f1d312916a0c106b8584465d5b021d0d07 (diff)
Patch from Steve White to fix a problem when the filesystem is
case independent. git-svn-id: http://svn.cactuscode.org/flesh/trunk@4023 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/sbin/f_depend_modules.pl')
-rwxr-xr-xlib/sbin/f_depend_modules.pl36
1 files changed, 26 insertions, 10 deletions
diff --git a/lib/sbin/f_depend_modules.pl b/lib/sbin/f_depend_modules.pl
index e7565dc5..3065a040 100755
--- a/lib/sbin/f_depend_modules.pl
+++ b/lib/sbin/f_depend_modules.pl
@@ -62,14 +62,22 @@ while (<STDIN>)
if (! $found)
{
# reference to a module in this thorn?
- loop: foreach my $suffix (@suffixes)
+ my $dirhdl;
+ if( opendir( $dirhdl, "$srcdir" ) )
{
- if (-e "$srcdir/$name$suffix")
+ while( defined( my $filename = readdir( $dirhdl ) ) )
{
- $found = 1;
- print " \\\n $name$suffix.o";
- last loop;
+ loop: foreach my $suffix (@suffixes)
+ {
+ if( $filename eq "$name$suffix" )
+ {
+ $found = 1;
+ print " \\\n $filename.o";
+ last loop;
+ }
+ }
}
+ closedir $dirhdl;
}
}
if (! $found)
@@ -80,14 +88,22 @@ while (<STDIN>)
# note: we could also use the SUBDIRS from the make.code.defn here
foreach my $subdir (".", "include")
{
- foreach my $suffix (@suffixes)
+ my $dirhdl;
+ if( opendir( $dirhdl, "$dir/$subdir" ) )
{
- if (-e "$dir/$subdir/$name$suffix.o")
+ while( defined( my $filename = readdir( $dirhdl ) ) )
{
- $found = 1;
- print " \\\n $dir/$subdir/$name$suffix.o";
- last loop;
+ foreach my $suffix (@suffixes)
+ {
+ if( $filename eq "$name$suffix.o" )
+ {
+ $found = 1;
+ print " \\\n $dir/$subdir/$filename";
+ last loop;
+ }
+ }
}
+ closedir $dirhdl;
}
}
}