## @file\r
# This file is used to parse meta files\r
#\r
-# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>\r
# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
\r
self._ValueList = [ReplaceMacro(Value, self._Macros) for Value in self._ValueList]\r
Name, Value = self._ValueList[1], self._ValueList[2]\r
+ MacroUsed = GlobalData.gMacroRefPattern.findall(Value)\r
+ if len(MacroUsed) != 0:\r
+ for Macro in MacroUsed:\r
+ if Macro in GlobalData.gGlobalDefines:\r
+ EdkLogger.error("Parser", FORMAT_INVALID, "Global macro %s is not permitted." % (Macro), ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
+ else:\r
+ EdkLogger.error("Parser", FORMAT_INVALID, "%s not defined" % (Macro), ExtraData=self._CurrentLine, File=self.MetaFile, Line=self._LineIndex + 1)\r
# Sometimes, we need to make differences between EDK and EDK2 modules \r
if Name == 'INF_VERSION':\r
if re.match(r'0[xX][\da-f-A-F]{5,8}', Value):\r
## @file\r
# This file is used to create a database used by build tool\r
#\r
-# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.<BR>\r
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
if self.AutoGenVersion < 0x00010005:\r
self.__Macros.update(GlobalData.gEdkGlobal)\r
self.__Macros.update(GlobalData.gGlobalDefines)\r
+ else:\r
+ self.__Macros.update(self.Defines)\r
return self.__Macros\r
\r
## Get architecture\r