Use os methods to expand env vars
This commit is contained in:
parent
b787ee4411
commit
e3f6d8349b
|
@ -147,18 +147,10 @@ class BlackParrotRV64(CPU):
|
||||||
continue
|
continue
|
||||||
elif ("+incdir+" in temp) :
|
elif ("+incdir+" in temp) :
|
||||||
s1 = line.find('$')
|
s1 = line.find('$')
|
||||||
s2 = line.find('/')
|
vdir = os.path.expandvars(line[s1:]).strip()
|
||||||
dir_ = line[s1:s2]
|
|
||||||
a = os.popen('echo '+ str(dir_))
|
|
||||||
dir_start = a.read()
|
|
||||||
vdir = dir_start[:-1] + line[s2:-1]
|
|
||||||
platform.add_verilog_include_path(vdir)
|
platform.add_verilog_include_path(vdir)
|
||||||
elif (temp[0]=='$') :
|
elif (temp[0]=='$') :
|
||||||
s2 = line.find('/')
|
vdir = os.path.expandvars(line).strip()
|
||||||
dir_ = line[0:s2]
|
|
||||||
a = os.popen('echo '+ str(dir_))
|
|
||||||
dir_start = a.read()
|
|
||||||
vdir = dir_start[:-1]+ line[s2:-1]
|
|
||||||
platform.add_source(vdir, "systemverilog")
|
platform.add_source(vdir, "systemverilog")
|
||||||
elif (temp[0] == '/'):
|
elif (temp[0] == '/'):
|
||||||
assert("No support for absolute path for now")
|
assert("No support for absolute path for now")
|
||||||
|
|
Loading…
Reference in New Issue