summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorHess Chen <hesheng.chen@intel.com>2014-08-21 07:51:21 +0000
committerhchen30 <hchen30@6f19259b-4bc3-4df7-8a09-765794883524>2014-08-21 07:51:21 +0000
commit0923aa1c3ad1a68f4781a98897889f3976d1b83d (patch)
tree0995d8898f2031e96be0decf6b3c93c7eccb709e /BaseTools
parent07b8564b113431f70ef4fcc469a42be5e4700263 (diff)
downloadedk2-0923aa1c3ad1a68f4781a98897889f3976d1b83d.tar.gz
edk2-0923aa1c3ad1a68f4781a98897889f3976d1b83d.tar.bz2
edk2-0923aa1c3ad1a68f4781a98897889f3976d1b83d.zip
This patch is going to:
1. Skip the content defined in USER EXTENSION section without raising an error. 2. Wrap os.utime to use two arguments. 3. Add GenFdsCommand for PlatformAutoGen Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen <hesheng.chen@intel.com> Reviewed-by: Gao, Liming <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15865 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py1
-rw-r--r--BaseTools/Source/Python/Common/LongFilePathOs.py4
-rw-r--r--BaseTools/Source/Python/Workspace/MetaFileParser.py14
3 files changed, 13 insertions, 6 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index 5dc2cfd7bd..c589e2c016 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1962,6 +1962,7 @@ class PlatformAutoGen(AutoGen):
BuildRule = property(_GetBuildRule)
ModuleAutoGenList = property(_GetModuleAutoGenList)
LibraryAutoGenList = property(_GetLibraryAutoGenList)
+ GenFdsCommand = property(_GenFdsCommand)
## ModuleAutoGen class
#
diff --git a/BaseTools/Source/Python/Common/LongFilePathOs.py b/BaseTools/Source/Python/Common/LongFilePathOs.py
index 66d93d25f3..2e530f9dd7 100644
--- a/BaseTools/Source/Python/Common/LongFilePathOs.py
+++ b/BaseTools/Source/Python/Common/LongFilePathOs.py
@@ -48,8 +48,8 @@ def chmod(path, mode):
def stat(path):
return os.stat(LongFilePath(path))
-def utime(path):
- return os.utime(LongFilePath(path), None)
+def utime(path, times):
+ return os.utime(LongFilePath(path), times)
def listdir(path):
List = []
diff --git a/BaseTools/Source/Python/Workspace/MetaFileParser.py b/BaseTools/Source/Python/Workspace/MetaFileParser.py
index 7e6e2db40d..98939093d3 100644
--- a/BaseTools/Source/Python/Workspace/MetaFileParser.py
+++ b/BaseTools/Source/Python/Workspace/MetaFileParser.py
@@ -266,6 +266,10 @@ class MetaFileParser(object):
Line=self._LineIndex + 1, ExtraData=self._CurrentLine);
self._ValueList[0:1] = [self._CurrentLine]
+ ## Skip unsupported data for UserExtension Section
+ def _SkipUserExtension(self):
+ self._ValueList[0:1] = [self._CurrentLine]
+
## Section header parser
#
# The section header is always in following format:
@@ -756,7 +760,7 @@ class InfParser(MetaFileParser):
MODEL_EFI_PPI : MetaFileParser._CommonParser,
MODEL_EFI_DEPEX : _DepexParser,
MODEL_EFI_BINARY_FILE : _BinaryFileParser,
- MODEL_META_DATA_USER_EXTENSION : MetaFileParser._Skip,
+ MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,
}
## DSC file parser class
@@ -796,6 +800,7 @@ class DscParser(MetaFileParser):
TAB_ELSE_IF.upper() : MODEL_META_DATA_CONDITIONAL_STATEMENT_ELSEIF,
TAB_ELSE.upper() : MODEL_META_DATA_CONDITIONAL_STATEMENT_ELSE,
TAB_END_IF.upper() : MODEL_META_DATA_CONDITIONAL_STATEMENT_ENDIF,
+ TAB_USER_EXTENSIONS.upper() : MODEL_META_DATA_USER_EXTENSION,
}
# Valid names in define section
@@ -1205,7 +1210,7 @@ class DscParser(MetaFileParser):
MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH : self.__ProcessSourceOverridePath,
MODEL_META_DATA_BUILD_OPTION : self.__ProcessBuildOption,
MODEL_UNKNOWN : self._Skip,
- MODEL_META_DATA_USER_EXTENSION : self._Skip,
+ MODEL_META_DATA_USER_EXTENSION : self._SkipUserExtension,
}
self._Table = MetaFileStorage(self._RawTable.Cur, self.MetaFile, MODEL_FILE_DSC, True)
@@ -1547,7 +1552,7 @@ class DscParser(MetaFileParser):
MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH : _CompponentSourceOverridePathParser,
MODEL_META_DATA_BUILD_OPTION : _BuildOptionParser,
MODEL_UNKNOWN : MetaFileParser._Skip,
- MODEL_META_DATA_USER_EXTENSION : MetaFileParser._Skip,
+ MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,
MODEL_META_DATA_SECTION_HEADER : MetaFileParser._SectionHeaderParser,
MODEL_META_DATA_SUBSECTION_HEADER : _SubsectionHeaderParser,
}
@@ -1576,6 +1581,7 @@ class DecParser(MetaFileParser):
TAB_PCDS_FEATURE_FLAG_NULL.upper() : MODEL_PCD_FEATURE_FLAG,
TAB_PCDS_DYNAMIC_NULL.upper() : MODEL_PCD_DYNAMIC,
TAB_PCDS_DYNAMIC_EX_NULL.upper() : MODEL_PCD_DYNAMIC_EX,
+ TAB_USER_EXTENSIONS.upper() : MODEL_META_DATA_USER_EXTENSION,
}
## Constructor of DecParser
@@ -1860,7 +1866,7 @@ class DecParser(MetaFileParser):
MODEL_PCD_DYNAMIC : _PcdParser,
MODEL_PCD_DYNAMIC_EX : _PcdParser,
MODEL_UNKNOWN : MetaFileParser._Skip,
- MODEL_META_DATA_USER_EXTENSION : MetaFileParser._Skip,
+ MODEL_META_DATA_USER_EXTENSION : MetaFileParser._SkipUserExtension,
}
##