Skip to content

Commit

Permalink
Merge branch 'master' of github.com:parrot/parrot
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Aug 19, 2012
2 parents 0214774 + da9adfa commit 97c7041
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 7 deletions.
3 changes: 1 addition & 2 deletions config/auto/warnings.pm
@@ -1,4 +1,4 @@
# Copyright (C) 2007-2011, Parrot Foundation.
# Copyright (C) 2007-2012, Parrot Foundation.

=head1 NAME
Expand Down Expand Up @@ -172,7 +172,6 @@ sub _init {
-Wfloat-equal
-Wformat=2
-Wlarger-than-4096
-Wlong-long
-Wmissing-format-attribute
-Wdeprecated-declarations
-Wno-format-extra-args
Expand Down
35 changes: 30 additions & 5 deletions t/src/checkdepend.t
Expand Up @@ -239,11 +239,36 @@ sub collapse_path {
return $path unless defined $path;

my $cwd = getcwd();
$path = abs_path($path);
return $path unless defined $path;

$path =~ s/^\Q$cwd\E\///;
return $path;
# With a symlinked builddir need to collapse x/../y sections into y.
# It is safe with our directory structure
if ( -l $path ) {
my $up = File::Spec->updir();
my $upsep = File::Spec->catfile($up, '');
if (index($path, $upsep) > -1) {
my ($vol,$dir,$fname) = File::Spec->splitpath($path);
my @dirs = File::Spec->splitdir($dir);
my @newdirs;
while (@dirs) {
my $d = shift @dirs;
if ($d eq $up) {
warn unless @newdirs;
pop @newdirs;
}
else {
push @newdirs, $d;
}
}
my $newpath = File::Spec->catfile
($vol ? ($vol, File::Spec->catdir(@newdirs), $fname)
: (File::Spec->catdir(@newdirs), $fname));
return $newpath;
}
return File::Spec->abs2rel( $path, $cwd ) ;
}
my $abspath = abs_path($path);
return $path unless defined $abspath;
$abspath =~ s/^\Q$cwd\E\///;
return $abspath;
}

sub get_deps {
Expand Down

0 comments on commit 97c7041

Please sign in to comment.