aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-09-23 23:16:54 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2013-09-23 23:16:54 +0300
commita9eb2e73171c8ae38f33c9195fcc45acf657faa0 (patch)
tree1c682d5c67d74ce2bca2aeec8f356ce614436d66 /build.py
parent08622ae644c7b6fdc624c98fb9f7c83eb1fa4f7e (diff)
downloadmeson-a9eb2e73171c8ae38f33c9195fcc45acf657faa0.zip
meson-a9eb2e73171c8ae38f33c9195fcc45acf657faa0.tar.gz
meson-a9eb2e73171c8ae38f33c9195fcc45acf657faa0.tar.bz2
Surgical strike complete. Data has been extracted from interpreter and unit tests pass.
Diffstat (limited to 'build.py')
-rw-r--r--build.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/build.py b/build.py
index 1f5cf22..bbc3ac4 100644
--- a/build.py
+++ b/build.py
@@ -13,8 +13,9 @@
# limitations under the License.
import coredata
-import copy, os
import environment
+import dependencies
+import copy, os
class InvalidArguments(coredata.MesonException):
pass
@@ -112,6 +113,9 @@ class BuildTarget():
if not isinstance(sources, list):
sources = [sources]
for s in sources:
+ # Holder unpacking. Ugly.
+ if hasattr(s, 'glist'):
+ s = s.glist
if isinstance(s, str):
self.sources.append(s)
elif isinstance(s, GeneratedList):
@@ -205,8 +209,9 @@ class BuildTarget():
def add_external_deps(self, deps):
for dep in deps:
- if not isinstance(dep, dependencies.Dependency) and\
- not isinstance(dep, ExternalLibraryHolder):
+ if hasattr(dep, 'el'):
+ dep = dep.el
+ if not isinstance(dep, dependencies.Dependency):
raise InvalidArguments('Argument is not an external dependency')
self.external_deps.append(dep)
if isinstance(dep, dependencies.Dependency):