From 3172be86b1059554f51c55dfbc0bf58d1f029416 Mon Sep 17 00:00:00 2001 From: Derek Bankieris Date: Fri, 8 Jun 2018 08:09:17 -0500 Subject: [PATCH] Fix special treatment of "src" AGAIN Great feature. Really, I love it. Refs #627 --- libexec/trick/make_makefile_src | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libexec/trick/make_makefile_src b/libexec/trick/make_makefile_src index 1643cf1f..24017ed0 100755 --- a/libexec/trick/make_makefile_src +++ b/libexec/trick/make_makefile_src @@ -338,8 +338,8 @@ foreach $k ( sort keys %files_by_dir ) { # Look for makefile_overrides in the current directory. # If no such file exists AND this directory is named "src", look for it one level up. # Silly, but baggage we're stuck with. - my $makefile_overrides = "$k/makefile_overrides" ; - if (not -e $makefile_overrides and $k =~ /\/src$/) { + my $makefile_overrides = "${k}makefile_overrides" ; + if (not -e $makefile_overrides and $k =~ /\/src\/$/) { $makefile_overrides = dirname($k) . "/makefile_overrides" ; } if (open OV_FILE, $makefile_overrides) { @@ -354,7 +354,7 @@ foreach $k ( sort keys %files_by_dir ) { if ( s/^objects\s*:\s*// ) { foreach my $extension ( keys %files_by_extension ) { foreach my $file (@{$files_by_dir{$k}{$extension}}) { - $files_by_dir{$k}{overrides} .= "build$k/${file}.o \\\n" ; + $files_by_dir{$k}{overrides} .= "build$k${file}.o \\\n" ; } } $files_by_dir{$k}{overrides} .= ": $_" @@ -362,7 +362,7 @@ foreach $k ( sort keys %files_by_dir ) { elsif ( s/(.+)_objects\s*:\s*// ) { if (scalar @{$files_by_dir{$k}{".$1"}}) { foreach my $file (@{$files_by_dir{$k}{".$1"}}) { - $files_by_dir{$k}{overrides} .= "build$k/$file.o \\\n" ; + $files_by_dir{$k}{overrides} .= "build$k$file.o \\\n" ; } $files_by_dir{$k}{overrides} .= ": $_" }