diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2007-03-11 16:26:56 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2007-03-11 16:26:56 -0700 |
commit | 41956dcf341ea42e7990d39bfcebe860b1375538 (patch) | |
tree | cc47f8d5256e2748205baaa489e79ff97dc87740 /v4l/scripts | |
parent | 6d4a3b8de8a3c9f1b5d470f8ff6fa30c59382cc6 (diff) | |
download | mediapointer-dvb-s2-41956dcf341ea42e7990d39bfcebe860b1375538.tar.gz mediapointer-dvb-s2-41956dcf341ea42e7990d39bfcebe860b1375538.tar.bz2 |
scripts: Enhance analyze_build a bit
From: Trent Piepho <xyzzy@speakeasy.org>
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 <xyzzy@speakeasy.org>
Diffstat (limited to 'v4l/scripts')
-rwxr-xr-x | v4l/scripts/analyze_build.pl | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |