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 | |
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
-rw-r--r-- | Makefile | 9 | ||||
-rwxr-xr-x | scripts/checkversion.pl | 1 | ||||
-rw-r--r-- | scripts/export_report.pl | 26 | ||||
-rwxr-xr-x | scripts/patch-kernel | 2 |
4 files changed, 28 insertions, 10 deletions
@@ -1009,7 +1009,8 @@ include/generated/utsrelease.h: include/config/kernel.release FORCE | |||
1009 | 1009 | ||
1010 | PHONY += headerdep | 1010 | PHONY += headerdep |
1011 | headerdep: | 1011 | headerdep: |
1012 | $(Q)find include/ -name '*.h' | xargs --max-args 1 scripts/headerdep.pl | 1012 | $(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \ |
1013 | $(srctree)/scripts/headerdep.pl -I$(srctree)/include | ||
1013 | 1014 | ||
1014 | # --------------------------------------------------------------------------- | 1015 | # --------------------------------------------------------------------------- |
1015 | 1016 | ||
@@ -1417,13 +1418,15 @@ tags TAGS cscope gtags: FORCE | |||
1417 | # Scripts to check various things for consistency | 1418 | # Scripts to check various things for consistency |
1418 | # --------------------------------------------------------------------------- | 1419 | # --------------------------------------------------------------------------- |
1419 | 1420 | ||
1421 | PHONY += includecheck versioncheck coccicheck namespacecheck export_report | ||
1422 | |||
1420 | includecheck: | 1423 | includecheck: |
1421 | find * $(RCS_FIND_IGNORE) \ | 1424 | find $(srctree)/* $(RCS_FIND_IGNORE) \ |
1422 | -name '*.[hcS]' -type f -print | sort \ | 1425 | -name '*.[hcS]' -type f -print | sort \ |
1423 | | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl | 1426 | | xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl |
1424 | 1427 | ||
1425 | versioncheck: | 1428 | versioncheck: |
1426 | find * $(RCS_FIND_IGNORE) \ | 1429 | find $(srctree)/* $(RCS_FIND_IGNORE) \ |
1427 | -name '*.[hcS]' -type f -print | sort \ | 1430 | -name '*.[hcS]' -type f -print | sort \ |
1428 | | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl | 1431 | | xargs $(PERL) -w $(srctree)/scripts/checkversion.pl |
1429 | 1432 | ||
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; | |||
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 04dce7c15f83..8f79b701de87 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 46a59cae3a0a..20fb25c23382 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 |