summaryrefslogtreecommitdiffstats
path: root/tools/addtargetdir.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/addtargetdir.pl')
-rwxr-xr-xtools/addtargetdir.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/addtargetdir.pl b/tools/addtargetdir.pl
index 2cddf8d3d4..2c08d328dc 100755
--- a/tools/addtargetdir.pl
+++ b/tools/addtargetdir.pl
@@ -21,7 +21,7 @@ for (<STDIN>) {
if (/^([^:]+): (\S+) (.*)/) {
my ($target, $src, $rest) = ($1, $2, $3);
my $dir = dirname $src;
- $dir =~ s/$rbroot//;
+ $dir =~ s/^.*$rbroot//;
print "$builddir$dir/$target: $src $rest\n";
}
elsif (/^([^:]+): \\/) {
@@ -32,7 +32,7 @@ for (<STDIN>) {
if (/^\s+([^ ]+) (.*)/) {
my ($src, $rest) = ($1, $2);
my $dir = dirname $src;
- $dir =~ s/$rbroot//;
+ $dir =~ s/^.*$rbroot//;
print "$builddir$dir/$target2: $src $rest\n";
$target2 = "";
}