From 41956dcf341ea42e7990d39bfcebe860b1375538 Mon Sep 17 00:00:00 2001 From: Trent Piepho Date: Sun, 11 Mar 2007 16:26:56 -0700 Subject: scripts: Enhance analyze_build a bit From: Trent Piepho In one case a Kbuild file would do something like: foo-objs := a.o b.o foo-objs += c.o analyze_build didn't understand that the second lines _adds_ c.o to the objects that make up foo.ko. It would think that foo.ko was made up of only c.o. Should be fixed now. Signed-off-by: Trent Piepho --- v4l/scripts/analyze_build.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'v4l/scripts') diff --git a/v4l/scripts/analyze_build.pl b/v4l/scripts/analyze_build.pl index 945377fa4..9a291a2e3 100755 --- a/v4l/scripts/analyze_build.pl +++ b/v4l/scripts/analyze_build.pl @@ -97,9 +97,15 @@ sub open_makefile($) { next; } if (/(\S+)-objs\s*([:+]?)=\s*(\S.*?)\s*$/) { - print STDERR "Should use ':=' in $file:$.\n$_\n" if ($check && $2 ne ':'); my @files = split(/\s+/, $3); map { s|^(.*)\.o$|$dir/\1| } @files; + if ($2 eq '+') { + # Adding to files + print STDERR "Should use ':=' in $file:$.\n$_\n" if ($check && !exists $multi{"$dir/$1"}); + push @files, @{$multi{"$dir/$1"}}; + } else { + print STDERR "Setting objects twice in $file:$.\n$_\n" if ($check && exists $multi{"$dir/$1"}); + } $multi{"$dir/$1"} = \@files; next; } -- cgit v1.2.3