|
|
@ -203,12 +203,15 @@ class BuildTarget(): |
|
|
|
def process_sourcelist(self, sources): |
|
|
|
def process_sourcelist(self, sources): |
|
|
|
if not isinstance(sources, list): |
|
|
|
if not isinstance(sources, list): |
|
|
|
sources = [sources] |
|
|
|
sources = [sources] |
|
|
|
|
|
|
|
added_sources = {} # If the same source is defined multiple times, use it only once. |
|
|
|
for s in sources: |
|
|
|
for s in sources: |
|
|
|
# Holder unpacking. Ugly. |
|
|
|
# Holder unpacking. Ugly. |
|
|
|
if hasattr(s, 'held_object'): |
|
|
|
if hasattr(s, 'held_object'): |
|
|
|
s = s.held_object |
|
|
|
s = s.held_object |
|
|
|
if isinstance(s, str): |
|
|
|
if isinstance(s, str): |
|
|
|
|
|
|
|
if not s in added_sources: |
|
|
|
self.sources.append(s) |
|
|
|
self.sources.append(s) |
|
|
|
|
|
|
|
added_sources[s] = True |
|
|
|
elif isinstance(s, GeneratedList) or isinstance(s, CustomTarget): |
|
|
|
elif isinstance(s, GeneratedList) or isinstance(s, CustomTarget): |
|
|
|
self.generated.append(s) |
|
|
|
self.generated.append(s) |
|
|
|
else: |
|
|
|
else: |
|
|
|