From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hqnvemgate25.nvidia.com (hqnvemgate25.nvidia.com [216.228.121.64]) by mx.groups.io with SMTP id smtpd.web12.1330.1587366435549458772 for ; Mon, 20 Apr 2020 00:07:15 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nvidia.com header.s=n1 header.b=pAAL4ish; spf=pass (domain: nvidia.com, ip: 216.228.121.64, mailfrom: ashishsingha@nvidia.com) Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 20 Apr 2020 00:06:14 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 20 Apr 2020 00:07:15 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 20 Apr 2020 00:07:15 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 20 Apr 2020 07:07:14 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.176) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Mon, 20 Apr 2020 07:07:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W9R/VvYYj1eFChNglIhL6UfIm32VSHSaK+nzqt/5CEaWFvLmt06s+SPVVU1BzAbztojhmCWdSGkgs2p+uc40BZG7sTR23tsg3hOR/U1SHVOxQ5KimpW1Bwsv5Kj2/nRGMuiCuhiSNFKw+QPi7bSq5sunhlz+iFBWIuf5Jn7zblpJGkFWCPVhF10ngwWwCitq1NruCtRAX5xtxvf12kdvAQ0d0rgsyVJk7ZDy7wTxVvRJPpOFxzSMaT8+ADH7WUA0MHKQvnoP0eSEWqHnnsLXU3R6op6Zmn0cjrfA6QSftWwzkbMiw6RJEUXxFbl9FoxH8AGKQiK7G8248yF9437KIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W7Sx6VMamJJkxQACJyz64rodLVrw0/hIIxL8uTJPUjM=; b=AzrmNli1lTDUveJK7BoR05yXnEs8WquTyBzCJNr7nS4uC5CaleEclP4SDJbQ/ua2hLbb/KsIOBoxtU375YiP8BUKeSO/F8olMQ4N4KMbmLaqFr1m0sFzQI+erw++hpxBTeBsE0I+x0mvkLXVq6hILk5slDQ9wMq1OHK+68q+n8yX7T42qY7VoFRkZLYrPHoRBjHGTWInlR4xxlyoQblybAxNgoDQ17cuX5g627FEn8nHHkHIMIK0aIZmLf6XEIhvXcv0WHg75+O1UpYJTCNHKx6B3J/hB7KpWrsiMDx8o04c/1V4XeYLDFT4iypACiTXZBP5ag+GjjTJTKgz5hTIKQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none Received: from BYAPR12MB2726.namprd12.prod.outlook.com (2603:10b6:a03:66::17) by BYAPR12MB2597.namprd12.prod.outlook.com (2603:10b6:a03:6e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Mon, 20 Apr 2020 07:07:13 +0000 Received: from BYAPR12MB2726.namprd12.prod.outlook.com ([fe80::61e1:6a43:d8b:f7a4]) by BYAPR12MB2726.namprd12.prod.outlook.com ([fe80::61e1:6a43:d8b:f7a4%6]) with mapi id 15.20.2921.027; Mon, 20 Apr 2020 07:07:13 +0000 From: "Ashish Singhal" To: "Lin, Derek (HPS SW)" , "devel@edk2.groups.io" , Bob Feng , "Gao, Liming" Subject: Re: [edk2-devel] Conditionally Include FDF File Thread-Topic: [edk2-devel] Conditionally Include FDF File Thread-Index: AQHWFtKZxMAU2rFjGkuX7RWe3+BlnKiBiO6AgAAKlLQ= Date: Mon, 20 Apr 2020 07:07:13 +0000 Message-ID: References: ,<25824.1587363415325446652@groups.io> In-Reply-To: <25824.1587363415325446652@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=ashishsingha@nvidia.com; x-originating-ip: [216.228.112.22] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 67671862-eae7-4826-1fd9-08d7e4f973b5 x-ms-traffictypediagnostic: BYAPR12MB2597: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 03793408BA x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BYAPR12MB2726.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10009020)(396003)(376002)(136003)(366004)(39860400002)(346002)(478600001)(9686003)(86362001)(33656002)(186003)(66446008)(66946007)(66476007)(52536014)(66556008)(19627405001)(64756008)(76116006)(55016002)(316002)(8676002)(81156014)(6506007)(71200400001)(53546011)(2906002)(5660300002)(26005)(110136005)(7696005)(8936002)(296002);DIR:OUT;SFP:1101; received-spf: None (protection.outlook.com: nvidia.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: iH7sHR2LnsI4JkLBfxXD8MlpV5HkjmvPUThueEU95l1/tre1DaKthYgbM+IZEvQvzRdbegn7Vhb99mDcQXZpeY6qzFj9Y/8PQe57K7iIbGLjjxftQtJnLDeyGK5kqUU+RGkuzajNIjSHgPT0l9iq9cSk59oVwKVUJ4xdH9xVupV83g2fHMS7pdtuRSj2ocB6KWigE6c5ewTCM+9rOa4onsVeculO6JPPAwB+vtBpk88S1D9lT+kuXDO1bf2l6+oK1GqdrdI0d/0S7Oqn3i1kLZlUPqfznn093ctP/E3rD5OYYMb/RHXjIMNOweoWMQz14HwRfx4qGNZJjrgHjt5Z6Ano/ethPI1BCHxnQxvGb6SIbQMZXt4LbHht6x5HCYpG4TBKU7IjNLPvFij4VaLKdaJ9KvjyzPwOMXIYXqpXpRpL+o8tf+DHcLYiL3/lpHA+ x-ms-exchange-antispam-messagedata: sGac7kaFdBDok+xTatePLq7g6RM3VnTealbLgNagvbEHWTxx5flPLCndtGYWxpxf3znmHo/01gm3pEU/XjVUtxvOZF9Y6C2h+uoVOk3aPAl/HNcfBAEEdzq7UuvnfslVAPJFh6gSFIgxfnQHtPmVqQ== x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 67671862-eae7-4826-1fd9-08d7e4f973b5 X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Apr 2020 07:07:13.4064 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: h+OLW9yAZGxW+9Br3RL21K+QzhQWMlEK1EFX6VW2BNxm+vAnHMzbnnMP3+XjXb5oy5pm2CBRFZdIUv/MBMz+9g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2597 Return-Path: ashishsingha@nvidia.com X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1587366374; bh=y+fLBuM0WkYwLn7At9/nzrh4R39nQ5yfUYKTcuN2P34=; h=X-PGP-Universal:ARC-Seal:ARC-Message-Signature: ARC-Authentication-Results:From:To:Subject:Thread-Topic: Thread-Index:Date:Message-ID:References:In-Reply-To: Accept-Language:X-MS-Has-Attach:X-MS-TNEF-Correlator: authentication-results:x-originating-ip:x-ms-publictraffictype: x-ms-office365-filtering-correlation-id:x-ms-traffictypediagnostic: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-forefront-prvs:x-forefront-antispam-report:received-spf: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info: x-ms-exchange-antispam-messagedata:x-ms-exchange-transport-forked: MIME-Version:X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg: Content-Language:Content-Type; b=pAAL4ishbr15GC0B7DcrdXPwI/amxLyOXhQyynwQ3/PhhGoyRehQm4O+G7Db5pZdM qb41LJOYuMlkJ6RgS/HiuEWF+nO/nnEEQnKF7yjuntMaV+KD5WKnWDKN9Ym0476fYE rid1AElOkcHm+qPPOb7nBTI9xGqjqrslmM6gViJEJYOS8qVM/mhL8XVIMPG1G7W+0N XJRWWpgZ76lsq19yvOr7kCqtGQJiGELFBMmWPqrTo0piJOganK25QWBSleD5YAza9N id72/ffhOXnYJcomQf8RV+fmI9VP2kJ5ONzKBJZSqCtC7NAVLAjSTuPKg1hKmf2c+3 /SYTYRpH8XFMQ== Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BYAPR12MB272627241ED20FC05BDFB9BEBAD40BYAPR12MB2726namp_" --_000_BYAPR12MB272627241ED20FC05BDFB9BEBAD40BYAPR12MB2726namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable It seems like this is happening because in FdfParser.py, include files ar= e processed before processing the conditional statements. I think this is= =20being done so that all defines (even from the included files) can be a= ccounted for before processing any conditionals. This seems to be a valid= =20flow from pre-processing perspective, although this leaves out the use= =20case where a file may be conditionally included. Bob/Liming, For now, I have fixed the issue by changing my conditional include to be = the following: In top-level FDF: !ifdef $(BUILD_PLATFORM_XYZ) =20 $(INCLUDE_XYZ_FDF) !endif In top-level DSC: !ifdef $(BUILD_PLATFORM_XYZ) =20 INCLUDE_XYZ_FDF =3D !include Platform/NVIDIA/XYZ.fdf.inc !endif Please suggest me if there is a batter way of working around this issue. Thanks Ashish ________________________________ From: Lin, Derek (HPS SW) Sent: Monday, April 20, 2020 12:16 AM To: Ashish Singhal ; devel@edk2.groups.io Subject: Re: [edk2-devel] Conditionally Include FDF File External email: Use caution opening links or attachments I saw this issue too. The included file is always included no matter the condition is TRUE or F= ALSE. ``` !if FALSE =20 !include abc.fdf !endif ``` -------------------------------------------------------------------------= ---------- This email message is for the sole use of the intended recipient(s) and m= ay contain confidential information. Any unauthorized review, use, disclosure or di= stribution is prohibited. If you are not the intended recipient, please contact the= =20sender by reply email and destroy all copies of the original message. -------------------------------------------------------------------------= ---------- --_000_BYAPR12MB272627241ED20FC05BDFB9BEBAD40BYAPR12MB2726namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
It seems like this is happening because in FdfParser.py, include files ar= e processed before processing the conditional statements. I think this is= =20being done so that all defines (even from the included files) can be a= ccounted for before processing any conditionals. =20This seems to be a valid flow from pre-processing perspective, althoug= h this leaves out the use case where a file may be conditionally included= .

Bob/Liming,

For now, I have fixed the issue by changing my conditional include to be = the following:

In top-level FDF:
!ifdef $(
In top-level DSC:
!ifdef $(BUILD_PLATFORM_= XYZ)
  INCLUDE_XYZ_FDF =3D !include Platform/NVIDIA/XYZ.fdf.inc
!endif

Please suggest me if there is a batter way of working around this issue.<= /div>

Thanks
Ashish

From: Lin, Derek (HPS S= W) <derek.lin2@hpe.com>
Sent: Monday, April 20, 2020 12:16 AM
To: Ashish Singhal <ashishsingha@nvidia.com>; devel@edk2.gro= ups.io <devel@edk2.groups.io>
Subject: Re: [edk2-devel] Conditionally Include FDF File
 
External email: = Use caution opening links or attachments

I saw this issue too.

The included file is always included no matter the condition is TRUE or F= ALSE.
```
!if FALSE
  !include abc.fdf
!endif
```


This email message is for the sole use of the intended recipient(s) = and may=20 contain confidential information.  Any unauthorized review, use, dis= closure=20 or distribution is prohibited.  If you are not the intended recipien= t,=20 please contact the sender by reply email and destroy all copies of the or= iginal=20 message.

--_000_BYAPR12MB272627241ED20FC05BDFB9BEBAD40BYAPR12MB2726namp_--