diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 21:53:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-06 21:53:33 -0500 |
commit | addd8c92cf55bba578b8a56e0f717a0a74b31008 (patch) | |
tree | 2329201d816460d4baa71c8463c761034f99b1eb /scripts/checkpatch.pl | |
parent | a84f6aa68e35a911c28e5871c87356dce3607b40 (diff) | |
parent | c68e58783f20d3eb32b99e1962b26462f2e3195a (diff) |
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
* 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
script/checkpatch.pl: warn about deprecated use of EXTRA_{A,C,CPP,LD}FLAGS
tags, powerpc: Update tags.sh to support _GLOBAL symbols
scripts: add extract-vmlinux
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5e93342d22f9..8fda3b3f7be8 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -1683,6 +1683,20 @@ sub process { | |||
1683 | #print "is_end<$is_end> length<$length>\n"; | 1683 | #print "is_end<$is_end> length<$length>\n"; |
1684 | } | 1684 | } |
1685 | 1685 | ||
1686 | if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && | ||
1687 | ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { | ||
1688 | my $flag = $1; | ||
1689 | my $replacement = { | ||
1690 | 'EXTRA_AFLAGS' => 'asflags-y', | ||
1691 | 'EXTRA_CFLAGS' => 'ccflags-y', | ||
1692 | 'EXTRA_CPPFLAGS' => 'cppflags-y', | ||
1693 | 'EXTRA_LDFLAGS' => 'ldflags-y', | ||
1694 | }; | ||
1695 | |||
1696 | WARN("DEPRECATED_VARIABLE", | ||
1697 | "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag}); | ||
1698 | } | ||
1699 | |||
1686 | # check we are in a valid source file if not then ignore this hunk | 1700 | # check we are in a valid source file if not then ignore this hunk |
1687 | next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); | 1701 | next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/); |
1688 | 1702 | ||