From c80bc729ca4cc92cfd656c8b32a450080d15a0d9 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Mon, 15 Aug 2011 01:07:14 -0400 Subject: [PATCH] --- yaml --- r: 274313 b: refs/heads/master c: c68e58783f20d3eb32b99e1962b26462f2e3195a h: refs/heads/master i: 274311: b545292177394bc92cbaf1921ce2f4cf510cc67a v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index cc8481de4614..8b9b67fe0beb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9c65426ad2cce12a2d72cdb42aa08f7ce946065d +refs/heads/master: c68e58783f20d3eb32b99e1962b26462f2e3195a diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 9d761c95eca2..955183ada37a 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -1661,6 +1661,20 @@ sub process { #print "is_end<$is_end> length<$length>\n"; } + if (($realfile =~ /Makefile.*/ || $realfile =~ /Kbuild.*/) && + ($line =~ /\+(EXTRA_[A-Z]+FLAGS).*/)) { + my $flag = $1; + my $replacement = { + 'EXTRA_AFLAGS' => 'asflags-y', + 'EXTRA_CFLAGS' => 'ccflags-y', + 'EXTRA_CPPFLAGS' => 'cppflags-y', + 'EXTRA_LDFLAGS' => 'ldflags-y', + }; + + WARN("DEPRECATED_VARIABLE", + "Use of $flag is deprecated, please use \`$replacement->{$flag} instead.\n" . $herecurr) if ($replacement->{$flag}); + } + # check we are in a valid source file if not then ignore this hunk next if ($realfile !~ /\.(h|c|s|S|pl|sh)$/);