From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1C0608222D for ; Wed, 22 Feb 2017 08:04:45 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP; 22 Feb 2017 08:04:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,194,1484035200"; d="scan'208";a="68314588" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 22 Feb 2017 08:04:38 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 22 Feb 2017 08:04:38 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Thu, 23 Feb 2017 00:04:34 +0800 From: "Zhu, Yonghong" To: Ard Biesheuvel , "Gao, Liming" , Laszlo Ersek CC: "edk2-devel@lists.01.org" , "Zhu, Yonghong" Thread-Topic: [edk2] [Patch] BaseTools: add error check for Macro usage in the INF file Thread-Index: AQHSjCmzAEqsg5jEJUSu3P/0TqTRYaF0Y4qAgACl7RCAACekcA== Date: Wed, 22 Feb 2017 16:04:33 +0000 Message-ID: References: <1487639901-43004-1-git-send-email-yonghong.zhu@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6E175C@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] BaseTools: add error check for Macro usage in the INF file X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Feb 2017 16:04:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgQXJkLA0KDQpJIGp1c3Qgc2VudCBvdXQgYSBwYXRjaCB0byBmaXggdGhpcyBpc3N1ZSx0aGFu a3MuDQoNCkJlc3QgUmVnYXJkcywNClpodSBZb25naG9uZw0KDQoNCi0tLS0tT3JpZ2luYWwgTWVz c2FnZS0tLS0tDQpGcm9tOiBaaHUsIFlvbmdob25nIA0KU2VudDogV2VkbmVzZGF5LCBGZWJydWFy eSAyMiwgMjAxNyA5OjM5IFBNDQpUbzogJ0FyZCBCaWVzaGV1dmVsJyA8YXJkLmJpZXNoZXV2ZWxA bGluYXJvLm9yZz47IEdhbywgTGltaW5nIDxsaW1pbmcuZ2FvQGludGVsLmNvbT47IExhc3psbyBF cnNlayA8bGVyc2VrQHJlZGhhdC5jb20+DQpDYzogZWRrMi1kZXZlbEBsaXN0cy4wMS5vcmc7IFpo dSwgWW9uZ2hvbmcgPHlvbmdob25nLnpodUBpbnRlbC5jb20+DQpTdWJqZWN0OiBSRTogW2VkazJd IFtQYXRjaF0gQmFzZVRvb2xzOiBhZGQgZXJyb3IgY2hlY2sgZm9yIE1hY3JvIHVzYWdlIGluIHRo ZSBJTkYgZmlsZQ0KDQpIaSBBcmQsDQoNClRoYW5rcy4gSSB3aWxsIHRyeSB0byBmaW5kIG91dCB0 aGUgcm9vdCBjYXVzZSBhbmQgZml4IGl0IEFTQVAuDQoNCkJlc3QgUmVnYXJkcywNClpodSBZb25n aG9uZw0KDQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBBcmQgQmllc2hldXZl bCBbbWFpbHRvOmFyZC5iaWVzaGV1dmVsQGxpbmFyby5vcmddDQpTZW50OiBXZWRuZXNkYXksIEZl YnJ1YXJ5IDIyLCAyMDE3IDc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