Samer El-Haj-Mahmoud
2015-07-02 01:12:05 UTC
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-***@hp.com>
---
BaseTools/Source/Python/GenFds/FdfParser.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 8091a51..15ec886 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1,6 +1,7 @@
## @file
# parse FDF file
#
+# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -639,6 +640,14 @@ class FdfParser:
TempList.insert(IncludeOffset, '#')
self.Profile.FileLinesList[IncludeLine - 1] = ''.join(TempList)
+ #
+ # Fix back-to-back !include in fdf parsing
+ # For example:
+ # !include Nt32Pkg/a.fdf
+ # !include Nt32Pkg/b.fdf
+ # Without this change the preprocessor will not expand b.fdf.
+ #
+ self.CurrentOffsetWithinLine = 0
self.Rewind()
def __GetIfListCurrentItemStat(self, IfList):
--
1.9.5.msysgit.1
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-***@hp.com>
---
BaseTools/Source/Python/GenFds/FdfParser.py | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py b/BaseTools/Source/Python/GenFds/FdfParser.py
index 8091a51..15ec886 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -1,6 +1,7 @@
## @file
# parse FDF file
#
+# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -639,6 +640,14 @@ class FdfParser:
TempList.insert(IncludeOffset, '#')
self.Profile.FileLinesList[IncludeLine - 1] = ''.join(TempList)
+ #
+ # Fix back-to-back !include in fdf parsing
+ # For example:
+ # !include Nt32Pkg/a.fdf
+ # !include Nt32Pkg/b.fdf
+ # Without this change the preprocessor will not expand b.fdf.
+ #
+ self.CurrentOffsetWithinLine = 0
self.Rewind()
def __GetIfListCurrentItemStat(self, IfList):
--
1.9.5.msysgit.1