rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame^] | 1 | use strict;
|
| 2 | use Cwd;
|
| 3 |
|
| 4 | my $theMF = $ARGV[0];
|
| 5 | my $custom = $ARGV[1];
|
| 6 | my $project = $ARGV[2];
|
| 7 |
|
| 8 | open (FILE_HANDLE, "<$theMF") or die "Cannot open $theMF. Please check if the file do not exists.\n";
|
| 9 |
|
| 10 | while (<FILE_HANDLE>) {
|
| 11 | if (/^(\w+)\b\s*=/)
|
| 12 | {
|
| 13 | if (/^(\S+)\s*=\s*(\S+)/) {
|
| 14 | if ($1 ne uc($1)) {
|
| 15 | print "\nFeature name $1 should be UPPER cases. please Correct $1 to ".uc($1)."\n\n";
|
| 16 | }
|
| 17 |
|
| 18 | if (($2 ne uc($2)) && ($1 !~ /CUSTOM_CFLAGS/i) && ($1 !~ /RELEASE_PACKAGE/i) && ($1 !~ /ORIGINAL_PROJECT_NAME/i) && ($1 !~ /ORIGINAL_FLAVOR/i) && ($1 !~ /CUSTOM_FLAVOR/i) && ($1 !~ /MODEM_SPEC/i)) {
|
| 19 | print "\n Feature value ($2) of ".uc($1)." should be UPPER cases. please Correct $2 to ".uc($2)."\n";
|
| 20 | }
|
| 21 | }
|
| 22 | }
|
| 23 | }
|
| 24 | close FILE_HANDLE;
|