Commit d7bb5760 authored by Thanassis Tsiodras's avatar Thanassis Tsiodras
Browse files

More robust handling of RCC path updates.

parent 58d5ca9d
...@@ -383,6 +383,7 @@ def CalculateUserCodeOnlyCFLAGS(node): ...@@ -383,6 +383,7 @@ def CalculateUserCodeOnlyCFLAGS(node):
def SetEnvForRTEMS(platformType): def SetEnvForRTEMS(platformType):
try: try:
src = None
if platformType.startswith("PLATFORM_X86_RTEMS"): if platformType.startswith("PLATFORM_X86_RTEMS"):
src = "RTEMS_MAKEFILE_PATH_X86" src = "RTEMS_MAKEFILE_PATH_X86"
os.putenv("RTEMS_MAKEFILE_PATH", os.environ[src]) os.putenv("RTEMS_MAKEFILE_PATH", os.environ[src])
...@@ -395,8 +396,8 @@ def SetEnvForRTEMS(platformType): ...@@ -395,8 +396,8 @@ def SetEnvForRTEMS(platformType):
elif platformType.startswith("PLATFORM_GUMSTIX_RTEMS"): elif platformType.startswith("PLATFORM_GUMSTIX_RTEMS"):
src = "RTEMS_MAKEFILE_PATH_GUMSTIX" src = "RTEMS_MAKEFILE_PATH_GUMSTIX"
os.putenv("RTEMS_MAKEFILE_PATH", os.environ[src]) os.putenv("RTEMS_MAKEFILE_PATH", os.environ[src])
if 'RTEMS' in platformType: if src is not None:
RMP = os.getenv("RTEMS_MAKEFILE_PATH") RMP = os.environ[src]
RCCPATH = os.sep.join(RMP.split(os.sep)[:-2] + ["bin"]) RCCPATH = os.sep.join(RMP.split(os.sep)[:-2] + ["bin"])
if RCCPATH not in os.getenv("PATH"): if RCCPATH not in os.getenv("PATH"):
os.putenv("PATH", RCCPATH + ":" + os.getenv("PATH")) os.putenv("PATH", RCCPATH + ":" + os.getenv("PATH"))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment