Hi,

Can you provide a simple example that shows how 
this feature is used and how it works?

Thanks,

Mike

> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-
> [email protected]] On Behalf Of Pankaj Bansal
> Sent: Sunday, February 25, 2018 10:29 PM
> To: [email protected]
> Cc: Gao, Liming <[email protected]>
> Subject: [edk2] [RFC] Add Platform Include path in
> modules
> 
> When we are writing the drivers for IP modules, then
> sometimes we want
> that Platform specific customizations or platform
> dependent values be
> supplied to IP module driver. normally we achieve this
> using Pcd values.
> 
> But sometimes we want to use header files for such
> data.e.g. if the
> values are complex structures.
> 
> we need a mechanism that platform be able to supply
> these header files
> to a module, without changing module code.
> 
> This patch is an attempt to achieve this functionality.
> 
> Cc: Yonghong Zhu <[email protected]>
> Cc: Liming Gao <[email protected]>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Pankaj Bansal <[email protected]>
> ---
>  BaseTools/Source/Python/AutoGen/AutoGen.py | 12
> ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> b/BaseTools/Source/Python/AutoGen/AutoGen.py
> index 405bfa1..de4a17c 100644
> --- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> @@ -3783,6 +3783,18 @@ class ModuleAutoGen(AutoGen):
>                  for Inc in IncludesList:
>                      if Inc not in
> self._IncludePathList:
> 
> self._IncludePathList.append(str(Inc))
> +            PackageFile =
> PathClass(os.path.join(self.PlatformInfo.MetaFile.SubDir
> , self.PlatformInfo.MetaFile.BaseName + '.dec'),
> self.PlatformInfo.MetaFile.Root)
> +            Package = self.BuildDatabase[PackageFile,
> self.Arch, self.BuildTarget, self.ToolChain]
> +            PackageDir = mws.join(self.WorkspaceDir,
> Package.MetaFile.Dir)
> +            if PackageDir not in self._IncludePathList:
> +
> self._IncludePathList.append(PackageDir)
> +            IncludesList = Package.Includes
> +            if Package._PrivateIncludes:
> +                if not
> self.MetaFile.Path.startswith(PackageDir):
> +                    IncludesList =
> list(set(Package.Includes).difference(set(Package._Priva
> teIncludes)))
> +            for Inc in IncludesList:
> +                if Inc not in self._IncludePathList:
> +
> self._IncludePathList.append(str(Inc))
>          return self._IncludePathList
> 
>      def _GetIncludePathLength(self):
> --
> 2.7.4
> 
> _______________________________________________
> 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