aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-09-05 06:38:10 +0000
committerlloyd <[email protected]>2006-09-05 06:38:10 +0000
commit764889d31e7034ebb8fe4fc879e565b474449564 (patch)
treebbd1e35151593f430d221355af0388db0a9d22c5
parent7433035c59c489b46bd9b54edf15b500d1f66104 (diff)
Move the call to main() up towards the top of the script so it's easier
to find.
-rwxr-xr-xconfigure.pl14
1 files changed, 6 insertions, 8 deletions
diff --git a/configure.pl b/configure.pl
index 12c168d00..b2512ed18 100755
--- a/configure.pl
+++ b/configure.pl
@@ -6,7 +6,6 @@ use strict;
use Getopt::Long;
use File::Spec;
use File::Copy;
-use Data::Dumper;
my $MAJOR_VERSION = 1;
my $MINOR_VERSION = 5;
@@ -75,6 +74,10 @@ my ($user_set_root, $doc_dir, $lib_dir) = ('', '', '');
my (%ignored_src, %ignored_include, %added_src, %added_include,
%lib_src, %check_src, %include);
+# Run stuff, quit
+main();
+exit;
+
sub main {
%CPU = read_info_files($ARCH_DIR, \&get_arch_info);
%OPERATING_SYSTEM = read_info_files($OS_DIR, \&get_os_info);
@@ -255,10 +258,6 @@ sub main {
\%added_src, using_libs($os, @using_mods));
}
-# Run stuff, quit
-main();
-exit;
-
sub error {
my $str = '(error): ';
foreach(@_) { $str .= $_; }
@@ -460,8 +459,8 @@ sub copy_files {
sub list_dir {
my ($dir, $ignore) = @_;
- opendir DIR, $dir or die "Couldn't open directory $dir ($!)\n";
- my @list = grep { !/^\./ } readdir DIR;
+
+ my @list = dir_list($dir);
if($dir eq $CHECK_DIR) {
@list = grep { !/\.dat$/ } grep { !/^keys$/ } grep { !/\.h$/ } @list;
@@ -471,7 +470,6 @@ sub list_dir {
if(defined($ignore)) {
@list = grep { !exists($$ignore{$_}) } @list;
}
- close DIR;
my %list = map { $_ => $dir } @list;
return %list;
}