Hi Brandon,

Thanks for the info. I think the spec is out of date, I will propose to update 
the spec and file a document change bug on Bugzilla system.

Best Regards,
Zhu Yonghong

-----Original Message-----
From: edk2-devel [mailto:[email protected]] On Behalf Of Huber, 
Brandon
Sent: Thursday, January 19, 2017 7:35 AM
To: edk2-devel ([email protected]) <[email protected]>
Subject: [edk2] DSC macro expansion

Hi All,

There seems to be a discrepancy between the DSC spec and the EDKII 
implementation regarding what macros are allowed in !include statements within 
a DSC file.

>From the spec (v1.26 section 2.2.5):

Macros, defined in this file, are not permitted in the path or file name of the 
!include statement, as these files are included prior to processing the file 
for macros. If the path starts with a "$" character, then one of the system 
environment variables, $(WORKSPACE), $(EDK_SOURCE), $(EFI_SOURCE), or 
$(ECP_SOURCE) is being used; only these system environment variables are 
permitted to start the path of the included file.
Yet from experimentation, all macros defined in DSC files seem to be permitted 
in !include statements by the build tools. Is the spec out of date, or is the 
code wrong?

I think the code in question is _GetMacros() in 
BaseTools/Source/Python/Workspace/WorkspaceDatabase.py<https://github.com/tianocore/edk2/commit/0d2711a69397d2971079121df4326d84736c181e#diff-7cfd5e9099421b207e7718d47950d40dR148>
 
(https://github.com/tianocore/edk2/commit/0d2711a69397d2971079121df4326d84736c181e#diff-7cfd5e9099421b207e7718d47950d40dR148).

Thanks,
-Brandon

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to