blob: e5de71a8ea2092b2d6c662cd4043c08592fa1dd4 [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001#!/bin/bash
2#
3# Copyright Statement:
4# --------------------
5# This software is protected by Copyright and the information contained
6# herein is confidential. The software may not be copied and the information
7# contained herein may not be used or disclosed except with the written
8# permission of MediaTek Inc. (C) 2011
9#
10# BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
11# THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
12# RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
13# AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
14# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
15# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
16# NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
17# SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
18# SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
19# THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
20# NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
21# SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
22#
23# BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
24# LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
25# AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
26# OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
27# MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
28#
29# THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
30# WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
31# LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
32# RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
33# THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
34#
35#
36export USERNAME=$LOGNAME
37export LANGUAGE=en_US
38export LC_ALL="en_US.UTF-8"
39export LANG="en_US.UTF-8"
40
41
42ARGV=($*)
43
44#Read project makefile to find out the SINGLE_CORE_ONLY property
45for var in "$@"
46do
47 if [[ "$var" == *\.mak* ]]; then
48 PROJECT_MAKEFILE=$var
49 fi
50done
51
52if [[ "$PROJECT_MAKEFILE" == *make/* ]]; then
53 PROJECT_MAKEFILE=$(basename $PROJECT_MAKEFILE)
54fi
55#echo PROJECT_MAKEFILE = $PROJECT_MAKEFILE
56
57if [ "$MTK_INTERNAL" == "TRUE" ] && [ "$MTK_CF" != "TRUE" ] && [ "$LTE_DOMAIN" != "TRUE" ]; then
58 #molyq perl make.pl $*
59 QUEUE='molyq'
60else
61if [ "$MTK_INTERNAL" == "TRUE" ] && [ "$MTK_CF" != "TRUE" ] && [ "$LTE_DOMAIN" == "TRUE" ] && [ "$LOGNAME" != "root" ]; then
62 #lteq perl make.pl $*
63 QUEUE='lteq'
64else
65 QUEUE=
66 #perl make.pl $*
67fi
68fi
69
70if [ "$QUEUE" != "" ]; then
71 export SUBMIT_TO_QUEUE_GMT_TIMESTAMP=`date +%s`
72fi
73
74$QUEUE perl make.pl ${ARGV[*]}