That is not the same use case. You are always including NetworkPkg/Network.fdf.inc and then inside of it you are using NETWORK_ENABLE flag to include the associated drivers or not include anything at all but the file exists. My use case differs where the file may not exist and that is why I have a conditional flag outside the include directive.

Thanks
Ashish

From: Laszlo Ersek <lersek@redhat.com>
Sent: Monday, April 20, 2020 6:05 AM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Ashish Singhal <ashishsingha@nvidia.com>; Bob Feng <bob.c.feng@intel.com>; Gao, Liming <liming.gao@intel.com>
Subject: Re: [edk2-devel] Conditionally Include FDF File
 
External email: Use caution opening links or attachments


On 04/20/20 07:25, Ashish Singhal wrote:

> I am trying to change my top-level FDF file layout by conditionally including an FDF depending on a build time define being passed or not.

> Any help getting around this

Try including unconditionally, and pushing down the !if into the includee.

This is known to work; see for example "NetworkPkg/Network.fdf.inc".

(The outermost "NETWORK_ENABLE" flag in "Network.fdf.inc" parallels your
use case.)

Thanks
Laszlo


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