yu.dong | c33b307 | 2024-08-21 23:14:49 -0700 | [diff] [blame^] | 1 | #!/usr/local/bin/perl
|
| 2 |
|
| 3 | #
|
| 4 | # Copyright Statement:
|
| 5 | # --------------------
|
| 6 | # This software is protected by Copyright and the information contained
|
| 7 | # herein is confidential. The software may not be copied and the information
|
| 8 | # contained herein may not be used or disclosed except with the written
|
| 9 | # permission of MediaTek Inc. (C) 2005
|
| 10 | #
|
| 11 | # BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
|
| 12 | # THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
|
| 13 | # RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
|
| 14 | # AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
|
| 15 | # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
|
| 16 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
|
| 17 | # NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
|
| 18 | # SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
|
| 19 | # SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
|
| 20 | # THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
|
| 21 | # NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
|
| 22 | # SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
|
| 23 | #
|
| 24 | # BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
|
| 25 | # LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
|
| 26 | # AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
|
| 27 | # OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
|
| 28 | # MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
|
| 29 | #
|
| 30 | # THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
|
| 31 | # WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
|
| 32 | # LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
|
| 33 | # RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
|
| 34 | # THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
|
| 35 | #
|
| 36 | #################################################################################
|
| 37 |
|
| 38 | use Win32::Process;
|
| 39 | use Win32;
|
| 40 | use File::Basename;
|
| 41 |
|
| 42 |
|
| 43 | # ..\make\comp.mak
|
| 44 |
|
| 45 | # mount net use from G to Z except M: K: U: , T:
|
| 46 | # W:\ is first priority
|
| 47 |
|
| 48 | my $CheckPath;
|
| 49 | my $result="FALSE";
|
| 50 | my $gotNetDrvChar;
|
| 51 |
|
| 52 |
|
| 53 | my $lintcfgfile = $ARGV[0];
|
| 54 | my $viaFile = $ARGV[1] ;
|
| 55 | #print "ExecLint.pl #56: via file = $ARGV[1] \n";
|
| 56 |
|
| 57 | my $sourceFile = $ARGV[2] ;
|
| 58 | #print "ExecLint.pl #60: source C file = $ARGV[2] \n";
|
| 59 |
|
| 60 | my $net_readonly_dir;
|
| 61 | my $lint;
|
| 62 |
|
| 63 |
|
| 64 | my $complintlogdir;
|
| 65 | my $component;
|
| 66 | my $cwd;
|
| 67 | my $fulllogpath;
|
| 68 | my $fulltoolspath;
|
| 69 |
|
| 70 |
|
| 71 | ######################################################################
|
| 72 |
|
| 73 | chomp($cwd = `cd`);
|
| 74 | #print "cwd==$cwd\n";
|
| 75 | #print "complintlogdir==$complintlogdir\n";
|
| 76 |
|
| 77 |
|
| 78 | #print "lintcfgfile == $lintcfgfile \n";
|
| 79 |
|
| 80 |
|
| 81 | open(F, "<$lintcfgfile") or die " $! $lintcfgfile \n";
|
| 82 |
|
| 83 | while (<F>)
|
| 84 | {
|
| 85 | # print "$_";
|
| 86 |
|
| 87 | if (/\s*Net_ReadOnly_DIR\s*=\s*(\S+)\s*/)
|
| 88 | {
|
| 89 | $net_readonly_dir = $1;
|
| 90 | #print "net_readonly_dir == $net_readonly_dir \n";
|
| 91 | }
|
| 92 | elsif (/\s*COMPLINTLOGDIR\s*=\s*([\.]+)(\S+)\s*/)
|
| 93 | {
|
| 94 | $complintlogdir = $2;
|
| 95 | #print "complintlogdir = $complintlogdir\n";
|
| 96 | }
|
| 97 | elsif (/\s*COMPONENT\s*=\s*(\S+)\s*/)
|
| 98 | {
|
| 99 | $component = $1;
|
| 100 | #print "component = $component\n";
|
| 101 | };
|
| 102 |
|
| 103 |
|
| 104 | };
|
| 105 |
|
| 106 | close(F);
|
| 107 |
|
| 108 | if ( "$complintlogdir" eq "")
|
| 109 | {
|
| 110 | exit 110;
|
| 111 | }
|
| 112 |
|
| 113 | #######################
|
| 114 |
|
| 115 | #print " net_readonly_dir == $net_readonly_dir \n";
|
| 116 | #print " LINT = $lint \n";
|
| 117 |
|
| 118 |
|
| 119 | #######################
|
| 120 |
|
| 121 | # print "ExecLint.pl line 92 \n";
|
| 122 |
|
| 123 | #print "cwd == $cwd\n";
|
| 124 |
|
| 125 | $fulllogpath = "$cwd"."$complintlogdir\\";
|
| 126 | $fulltoolspath = "$cwd\\"."pcore\\tools\\";
|
| 127 |
|
| 128 |
|
| 129 | #print "complintlogdir == $complintlogdir\n";
|
| 130 |
|
| 131 |
|
| 132 | print "perl pcore\\tools\\splitfile.pl "."$fulllogpath"."TMP_LNT.lnt $viaFile \n";
|
| 133 | system "perl pcore\\tools\\splitfile.pl "."$fulllogpath"."TMP_LNT.lnt $viaFile \n";
|
| 134 |
|
| 135 |
|
| 136 |
|
| 137 | print "$net_readonly_dir"."lint-nt.exe +v -zero -i"."$net_readonly_dir"." $fulllogpath"."TMP_LNT.lnt "."$fulltoolspath"."cd_me1.lnt co-ads.lnt +os("."$fulllogpath"."$component"."\.log) +oe("."$fulllogpath"."$component"."\.log) $sourceFile \n";
|
| 138 | system "$net_readonly_dir"."lint-nt.exe +v -zero -i"."$net_readonly_dir"." $fulllogpath"."TMP_LNT.lnt "."$fulltoolspath"."cd_me1.lnt co-ads.lnt +os("."$fulllogpath"."$component"."\.log) +oe("."$fulllogpath"."$component"."\.log) $sourceFile \n";
|
| 139 |
|
| 140 |
|
| 141 |
|
| 142 |
|