From: <ple...@tr...> - 2004-11-25 05:59:09
|
Log Message: ----------- bugfix - krang_build no longer attempts to load Platforms that do not have Platform.pm files Modified Files: -------------- krang/bin: krang_build Revision Data ------------- Index: krang_build =================================================================== RCS file: /usr/local/krang-cvs/krang/bin/krang_build,v retrieving revision 1.9 retrieving revision 1.10 diff -Lbin/krang_build -Lbin/krang_build -u -r1.9 -r1.10 --- bin/krang_build +++ bin/krang_build @@ -111,7 +111,11 @@ pod2usage("Wrong number of arguments.\n") if @ARGV > 1; my $platform; opendir(DIR, catdir($KrangRoot, 'platform')) or die $!; -my @platforms = grep { $_ !~ /^\.\.?$/ and $_ !~ /CVS/ } sort readdir DIR; +my @platforms; +while (my $f = readdir DIR) { + push @platforms, $f if (-e catfile($KrangRoot, 'platform', $f, 'Platform.pm')); +} +#my @platforms = grep { $_ !~ /^\.\.?$/ and $_ !~ /CVS/ } sort readdir DIR; # check that we're not trying to build on top of an existing build die "A build of Krang already exists here. Run 'make clean' to remove it". @@ -132,6 +136,7 @@ # look for a platform that wants to handle this my $found; foreach my $plat (@platforms) { + print "ATTEMPTING: $plat\n"; my $pkg = $plat . '::Platform'; eval "use $pkg"; die "Unable to load platform modules '$pkg': $@\n" if $@; |