|
From: <qh...@us...> - 2010-06-11 07:14:38
|
Revision: 1978
http://edk2-buildtools.svn.sourceforge.net/edk2-buildtools/?rev=1978&view=rev
Author: qhuang8
Date: 2010-06-11 07:14:32 +0000 (Fri, 11 Jun 2010)
Log Message:
-----------
Fix the incremental build hole about !include statement:
Whenever an !include file is successfully parsed, it inserts an imaginary named ?\226?\128?\156MODEL_EXTERNAL_DEPENDENCY?\226?\128?\157 to indicate that that the meta data file may have external dependency on other file. When we check the integrity of the meta data file, we need to consider all its external dependency.
Modified Paths:
--------------
trunk/BaseTools/Source/Python/CommonDataClass/DataClass.py
trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
trunk/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
Modified: trunk/BaseTools/Source/Python/CommonDataClass/DataClass.py
===================================================================
--- trunk/BaseTools/Source/Python/CommonDataClass/DataClass.py 2010-06-04 18:06:16 UTC (rev 1977)
+++ trunk/BaseTools/Source/Python/CommonDataClass/DataClass.py 2010-06-11 07:14:32 UTC (rev 1978)
@@ -1,7 +1,7 @@
## @file
-# This file is used to define class for data sturcture used in ECC
+# This file is used to define class for data structure used in ECC
#
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -92,6 +92,8 @@
MODEL_META_DATA_CONDITIONAL_STATEMENT_ENDIF = 5014
MODEL_META_DATA_COMPONENT_SOURCE_OVERRIDE_PATH = 5015
+MODEL_EXTERNAL_DEPENDENCY = 10000
+
MODEL_LIST = [('MODEL_UNKNOWN', MODEL_UNKNOWN),
('MODEL_FILE_C', MODEL_FILE_C),
('MODEL_FILE_H', MODEL_FILE_H),
Modified: trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2010-06-04 18:06:16 UTC (rev 1977)
+++ trunk/BaseTools/Source/Python/Workspace/MetaFileParser.py 2010-06-11 07:14:32 UTC (rev 1978)
@@ -774,6 +774,8 @@
except:
EdkLogger.error("Parser", PARSER_ERROR, File=self.MetaFile, Line=self._LineIndex+1,
ExtraData="Failed to parse content in file %s" % IncludedFile)
+ # insert an imaginary token in the DSC table to indicate its external dependency on another file
+ self._Store(MODEL_EXTERNAL_DEPENDENCY, IncludedFile, str(os.stat(IncludedFile)[8]), "")
# update current status with sub-parser's status
self._SectionName = Parser._SectionName
self._SectionType = Parser._SectionType
Modified: trunk/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py
===================================================================
--- trunk/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py 2010-06-04 18:06:16 UTC (rev 1977)
+++ trunk/BaseTools/Source/Python/Workspace/WorkspaceDatabase.py 2010-06-11 07:14:32 UTC (rev 1978)
@@ -2287,6 +2287,13 @@
Result = self.Cur.execute("select min(ID) from %s" % (TableName)).fetchall()
if Result[0][0] != -1:
return False
+ #
+ # Check whether the meta data file has external dependency by comparing the time stamp
+ #
+ Sql = "select Value1, Value2 from %s where Model=%d" % (TableName, MODEL_EXTERNAL_DEPENDENCY)
+ for Dependency in self.Cur.execute(Sql).fetchall():
+ if str(os.stat(Dependency[0])[8]) != Dependency[1]:
+ return False
except:
return False
return True
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|