aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 15:04:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 15:04:15 -0400
commit51b550a41c2ac0373b42f4e211f2df113b735b0a (patch)
treee7de61e10d2a040fd92405a5989631e9fc179eab /scripts
parent62af8163f9caa5b21996338ccd2564dfd727670e (diff)
parentca995cbf77f3df599b7e751c2d08d90787c65c45 (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-xscripts/checkversion.pl1
-rw-r--r--scripts/export_report.pl26
-rwxr-xr-xscripts/patch-kernel2
3 files changed, 22 insertions, 7 deletions
diff --git a/scripts/checkversion.pl b/scripts/checkversion.pl
index b444e89a0095..5e490a8ceca5 100755
--- a/scripts/checkversion.pl
+++ b/scripts/checkversion.pl
@@ -12,6 +12,7 @@ $| = 1;
12my $debugging; 12my $debugging;
13 13
14foreach my $file (@ARGV) { 14foreach 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 04dce7c15f83..8f79b701de87 100644
--- a/scripts/export_report.pl
+++ b/scripts/export_report.pl
@@ -25,11 +25,12 @@ sub alphabetically {
25sub print_depends_on { 25sub 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
51sub collectcfiles { 52sub 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#
105my $modversion_warnings = 0;
106
98foreach my $thismod (@allcfiles) { 107foreach 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
159modules. Each module lists the modules, and the symbols from that module that 169modules. Each module lists the modules, and the symbols from that module that
160it uses. Each listed symbol reports the number of modules using it\n"); 170it uses. Each listed symbol reports the number of modules using it\n");
161 171
172print "\nNOTE: Got $modversion_warnings CONFIG_MODVERSIONS warnings\n\n"
173 if $modversion_warnings;
174
162print "~"x80 , "\n"; 175print "~"x80 , "\n";
163while (my ($thismod, $list) = each %MODULE) { 176for 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 46a59cae3a0a..20fb25c23382 100755
--- a/scripts/patch-kernel
+++ b/scripts/patch-kernel
@@ -250,7 +250,7 @@ while : # incrementing SUBLEVEL (s in v.p.s)
250do 250do
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