diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 15:04:15 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 15:04:15 -0400 |
| commit | 51b550a41c2ac0373b42f4e211f2df113b735b0a (patch) | |
| tree | e7de61e10d2a040fd92405a5989631e9fc179eab /scripts | |
| parent | 62af8163f9caa5b21996338ccd2564dfd727670e (diff) | |
| parent | ca995cbf77f3df599b7e751c2d08d90787c65c45 (diff) | |
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6:
export_report: use warn() to issue WARNING, so they go to stderr
export_report: sort SECTION 2 output
export_report: do collectcfiles work in perl itself
kbuild: make versioncheck work in KBUILD_OUTDIR
kbuild: make includecheck work in KBUILD_OUTDIR
kbuild: make headerdep work in KBUILD_OUTDIR
kbuild: add targets to PHONY
kbuild: don't warn about include/linux/version.h not including itself
eradicate bashisms in scripts/patch-kernel
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/checkversion.pl | 1 | ||||
| -rw-r--r-- | scripts/export_report.pl | 26 | ||||
| -rwxr-xr-x | scripts/patch-kernel | 2 |
3 files changed, 22 insertions, 7 deletions
diff --git a/scripts/checkversion.pl b/scripts/checkversion.pl index b444e89a009..5e490a8ceca 100755 --- a/scripts/checkversion.pl +++ b/scripts/checkversion.pl | |||
| @@ -12,6 +12,7 @@ $| = 1; | |||
| 12 | my $debugging; | 12 | my $debugging; |
| 13 | 13 | ||
| 14 | foreach my $file (@ARGV) { | 14 | foreach my $file (@ARGV) { |
| 15 | next if $file =~ "include/linux/version\.h"; | ||
| 15 | # Open this file. | 16 | # Open this file. |
| 16 | open( my $f, '<', $file ) | 17 | open( my $f, '<', $file ) |
| 17 | or die "Can't open $file: $!\n"; | 18 | or die "Can't open $file: $!\n"; |
diff --git a/scripts/export_report.pl b/scripts/export_report.pl index 04dce7c15f8..8f79b701de8 100644 --- a/scripts/export_report.pl +++ b/scripts/export_report.pl | |||
| @@ -25,11 +25,12 @@ sub alphabetically { | |||
| 25 | sub print_depends_on { | 25 | sub print_depends_on { |
| 26 | my ($href) = @_; | 26 | my ($href) = @_; |
| 27 | print "\n"; | 27 | print "\n"; |
| 28 | while (my ($mod, $list) = each %$href) { | 28 | for my $mod (sort keys %$href) { |
| 29 | my $list = $href->{$mod}; | ||
| 29 | print "\t$mod:\n"; | 30 | print "\t$mod:\n"; |
| 30 | foreach my $sym (sort numerically @{$list}) { | 31 | foreach my $sym (sort numerically @{$list}) { |
| 31 | my ($symbol, $no) = split /\s+/, $sym; | 32 | my ($symbol, $no) = split /\s+/, $sym; |
| 32 | printf("\t\t%-25s\t%-25d\n", $symbol, $no); | 33 | printf("\t\t%-25s\n", $symbol); |
| 33 | } | 34 | } |
| 34 | print "\n"; | 35 | print "\n"; |
| 35 | } | 36 | } |
| @@ -49,8 +50,14 @@ sub usage { | |||
| 49 | } | 50 | } |
| 50 | 51 | ||
| 51 | sub collectcfiles { | 52 | sub collectcfiles { |
| 52 | my @file | 53 | my @file; |
| 53 | = `cat .tmp_versions/*.mod | grep '.*\.ko\$' | sed s/\.ko$/.mod.c/`; | 54 | while (<.tmp_versions/*.mod>) { |
| 55 | open my $fh, '<', $_ or die "cannot open $_: $!\n"; | ||
| 56 | push (@file, | ||
| 57 | grep s/\.ko/.mod.c/, # change the suffix | ||
| 58 | grep m/.+\.ko/, # find the .ko path | ||
| 59 | <$fh>); # lines in opened file | ||
| 60 | } | ||
| 54 | chomp @file; | 61 | chomp @file; |
| 55 | return @file; | 62 | return @file; |
| 56 | } | 63 | } |
| @@ -95,6 +102,8 @@ close($module_symvers); | |||
| 95 | # | 102 | # |
| 96 | # collect the usage count of each symbol. | 103 | # collect the usage count of each symbol. |
| 97 | # | 104 | # |
| 105 | my $modversion_warnings = 0; | ||
| 106 | |||
| 98 | foreach my $thismod (@allcfiles) { | 107 | foreach my $thismod (@allcfiles) { |
| 99 | my $module; | 108 | my $module; |
| 100 | 109 | ||
| @@ -125,7 +134,8 @@ foreach my $thismod (@allcfiles) { | |||
| 125 | } | 134 | } |
| 126 | } | 135 | } |
| 127 | if ($state != 2) { | 136 | if ($state != 2) { |
| 128 | print "WARNING:$thismod is not built with CONFIG_MODVERSION enabled\n"; | 137 | warn "WARNING:$thismod is not built with CONFIG_MODVERSIONS enabled\n"; |
| 138 | $modversion_warnings++; | ||
| 129 | } | 139 | } |
| 130 | close($module); | 140 | close($module); |
| 131 | } | 141 | } |
| @@ -159,8 +169,12 @@ printf("SECTION 2:\n\tThis section reports export-symbol-usage of in-kernel | |||
| 159 | modules. Each module lists the modules, and the symbols from that module that | 169 | modules. Each module lists the modules, and the symbols from that module that |
| 160 | it uses. Each listed symbol reports the number of modules using it\n"); | 170 | it uses. Each listed symbol reports the number of modules using it\n"); |
| 161 | 171 | ||
| 172 | print "\nNOTE: Got $modversion_warnings CONFIG_MODVERSIONS warnings\n\n" | ||
| 173 | if $modversion_warnings; | ||
| 174 | |||
| 162 | print "~"x80 , "\n"; | 175 | print "~"x80 , "\n"; |
| 163 | while (my ($thismod, $list) = each %MODULE) { | 176 | for my $thismod (sort keys %MODULE) { |
| 177 | my $list = $MODULE{$thismod}; | ||
| 164 | my %depends; | 178 | my %depends; |
| 165 | $thismod =~ s/\.mod\.c/.ko/; | 179 | $thismod =~ s/\.mod\.c/.ko/; |
| 166 | print "\t\t\t$thismod\n"; | 180 | print "\t\t\t$thismod\n"; |
diff --git a/scripts/patch-kernel b/scripts/patch-kernel index 46a59cae3a0..20fb25c2338 100755 --- a/scripts/patch-kernel +++ b/scripts/patch-kernel | |||
| @@ -250,7 +250,7 @@ while : # incrementing SUBLEVEL (s in v.p.s) | |||
| 250 | do | 250 | do |
| 251 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" | 251 | CURRENTFULLVERSION="$VERSION.$PATCHLEVEL.$SUBLEVEL" |
| 252 | EXTRAVER= | 252 | EXTRAVER= |
| 253 | if [ $STOPFULLVERSION = $CURRENTFULLVERSION ]; then | 253 | if [ x$STOPFULLVERSION = x$CURRENTFULLVERSION ]; then |
| 254 | echo "Stopping at $CURRENTFULLVERSION base as requested." | 254 | echo "Stopping at $CURRENTFULLVERSION base as requested." |
| 255 | break | 255 | break |
| 256 | fi | 256 | fi |
