From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 2067F821C3 for ; Wed, 22 Feb 2017 05:38:56 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 22 Feb 2017 05:38:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,194,1484035200"; d="scan'208";a="61110946" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 22 Feb 2017 05:38:55 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 22 Feb 2017 05:38:55 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx110.amr.corp.intel.com (10.18.116.10) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 22 Feb 2017 05:38:54 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.177]) with mapi id 14.03.0248.002; Wed, 22 Feb 2017 21:38:52 +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/0TqTRYaF0Y4qAgACl7RA= Date: Wed, 22 Feb 2017 13:38:52 +0000 Message-ID: References: <1487639901-43004-1-git-send-email-yonghong.zhu@intel.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6E175C@shsmsx102.ccr.corp.intel.com> In-Reply-To: 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 13:38:56 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgQXJkLA0KDQpUaGFua3MuIEkgd2lsbCB0cnkgdG8gZmluZCBvdXQgdGhlIHJvb3QgY2F1c2Ug YW5kIGZpeCBpdCBBU0FQLg0KDQpCZXN0IFJlZ2FyZHMsDQpaaHUgWW9uZ2hvbmcNCg0KDQotLS0t LU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogQXJkIEJpZXNoZXV2ZWwgW21haWx0bzphcmQu Ymllc2hldXZlbEBsaW5hcm8ub3JnXSANClNlbnQ6IFdlZG5lc2RheSwgRmVicnVhcnkgMjIsIDIw MTcgNzo0NCBQTQ0KVG86IEdhbywgTGltaW5nIDxsaW1pbmcuZ2FvQGludGVsLmNvbT47IExhc3ps byBFcnNlayA8bGVyc2VrQHJlZGhhdC5jb20+DQpDYzogWmh1LCBZb25naG9uZyA8eW9uZ2hvbmcu emh1QGludGVsLmNvbT47IGVkazItZGV2ZWxAbGlzdHMuMDEub3JnDQpTdWJqZWN0OiBSZTogW2Vk azJdIFtQYXRjaF0gQmFzZVRvb2xzOiBhZGQgZXJyb3IgY2hlY2sgZm9yIE1hY3JvIHVzYWdlIGlu IHRoZSBJTkYgZmlsZQ0KDQpPbiAyMSBGZWJydWFyeSAyMDE3IGF0IDEwOjAzLCBHYW8sIExpbWlu ZyA8bGltaW5nLmdhb0BpbnRlbC5jb20+IHdyb3RlOg0KPiBSZXZpZXdlZC1ieTogTGltaW5nIEdh byA8bGltaW5nLmdhb0BpbnRlbC5jb20+DQo+DQoNClRoaXMgcGF0Y2gg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