Question concerning Packages in INF-files with avairable path #6212
Replies: 2 comments
-
Defines from outside the INF are not allowed and that is on purpose. An INF is used to describe a single implementation with a single GUID/Version. If external settings change the behavior of the code described by the INF, then it is not the same module/lib. The best way to handle this is to add multiple INF files to the directory with different contents and the platform DSC can select the INF needed by that platform. Section 2.2.6 of https://tianocore-docs.github.io/edk2-InfSpecification/draft/2_inf_overview/22_information_file_general_rules.html#22-information-file-general-rules describes the use of macros in INF files. |
Beta Was this translation helpful? Give feedback.
-
Thank you for the quick response! |
Beta Was this translation helpful? Give feedback.
-
Is there a way to use a path to a .dec file with a variable in an inf-file?
I found an explanation which is almost matching my need here.
However, it does not make sense for me to add the define to the inf that I want to use independent of the platform package path.
I also tried adding the define to the dsc file, leading to the same error.
To me, it seems that the package variable is not resolved properly.
Is there documentation on implementing something like that or is this just impossible?
basically what I'm trying to accomplish is an implementation that instead of this:
[Packages.IA32]
DEFINE CPUS = IA32FamilyCpuPkg
$(CPUS)/DualCore/DualCore.dec
looks like this:
[Packages.IA32]
$(CPUS)/DualCore/DualCore.dec
and defining the variable CPUS somewhere outside my inf.
Beta Was this translation helpful? Give feedback.
All reactions