Navigation Menu

Skip to content

Commit

Permalink
Get Configure to work on Win32. open seems not to return false if $ex…
Browse files Browse the repository at this point in the history
…e doesn't exist, this works around it somewhat. Cleaner solutions welcome, but this works.
  • Loading branch information
jnthn committed Feb 10, 2009
1 parent 196ea50 commit f202f7f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Configure.pl
Expand Up @@ -21,6 +21,9 @@
exit(0);
}

# Work out slash character to use.
my $slash = $^O eq 'MSWin32' ? '\\' : '/';

# If we're in a Parrot build tree and --parrot-config isn't
# specified, use the build tree's reconfigure.pl and exit.
# if (!$options{'parrot-config'} && -e "../../tools/dev/reconfigure.pl") {
Expand All @@ -33,7 +36,7 @@

# Get a list of parrot-configs to invoke.
my @parrot_config_exe =
qw(parrot/parrot_config parrot_config ../../parrot_config);
("parrot${slash}parrot_config", "parrot_config", "..${slash}..${slash}parrot_config.exe");
if ($options{'parrot-config'} && $options{'parrot-config'} ne '1') {
@parrot_config_exe = ($options{'parrot-config'});
}
Expand Down Expand Up @@ -79,7 +82,7 @@ sub read_parrot_config {
if (/(\w+) => '(.*)'/) { $config{$1} = $2 }
}
close $PARROT_CONFIG;
last;
last if %config;
}
}
%config;
Expand Down

0 comments on commit f202f7f

Please sign in to comment.