PathList = PathStr.split()\r
if PathList:\r
for i, str in enumerate(PathList):\r
- if str.find(TAB_WORKSPACE) != -1:\r
- MacroStartPos = str.find(TAB_WORKSPACE)\r
- MacroEndPos = str.find(')', MacroStartPos)\r
- Substr = str[MacroEndPos+1:]\r
- if Substr.startswith('/') or Substr.startswith('\\'):\r
- Substr = Substr[1:]\r
- PathList[i] = str[0:MacroStartPos] + os.path.normpath(cls.join(cls.WORKSPACE, Substr))\r
+ MacroStartPos = str.find(TAB_WORKSPACE)\r
+ if MacroStartPos != -1:\r
+ Substr = str[MacroStartPos:]\r
+ Path = Substr.replace(TAB_WORKSPACE, cls.WORKSPACE).strip()\r
+ if not os.path.exists(Path):\r
+ for Pkg in cls.PACKAGES_PATH:\r
+ Path = Substr.replace(TAB_WORKSPACE, Pkg).strip()\r
+ if os.path.exists(Path):\r
+ break\r
+ PathList[i] = str[0:MacroStartPos] + Path\r
PathStr = ' '.join(PathList)\r
return PathStr\r
\r