mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
build/generic_platform/add_source: Tranform filename to absolute path earlier to catch duplications when relative/absolute paths are used in design.
This commit is contained in:
parent
f2319d39d4
commit
aebef65932
1 changed files with 2 additions and 1 deletions
|
@ -368,6 +368,7 @@ class GenericPlatform:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def add_source(self, filename, language=None, library=None):
|
def add_source(self, filename, language=None, library=None):
|
||||||
|
filename = os.path.abspath(filename)
|
||||||
if language is None:
|
if language is None:
|
||||||
language = tools.language_by_filename(filename)
|
language = tools.language_by_filename(filename)
|
||||||
if library is None:
|
if library is None:
|
||||||
|
@ -375,7 +376,7 @@ class GenericPlatform:
|
||||||
for f, _, _ in self.sources:
|
for f, _, _ in self.sources:
|
||||||
if f == filename:
|
if f == filename:
|
||||||
return
|
return
|
||||||
self.sources.append((os.path.abspath(filename), language, library))
|
self.sources.append((filename, language, library))
|
||||||
|
|
||||||
def add_sources(self, path, *filenames, language=None, library=None):
|
def add_sources(self, path, *filenames, language=None, library=None):
|
||||||
for f in filenames:
|
for f in filenames:
|
||||||
|
|
Loading…
Reference in a new issue