aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/build.py5
-rw-r--r--mesonbuild/interpreter.py9
2 files changed, 5 insertions, 9 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index eb1b826..2c55ed4 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -271,7 +271,10 @@ class EnvironmentVariables:
class Target:
def __init__(self, name, subdir, build_by_default):
if '/' in name or '\\' in name:
- raise InvalidArguments('Target name must not contain a path separator.')
+ # Fix failing test 53 when this becomes an error.
+ mlog.warning('''Target "%s" has a path separator in its name.
+This is not supported, it can cause unexpected failures and will become
+a hard error in the future.''' % name)
self.name = name
self.subdir = subdir
self.build_by_default = build_by_default
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index ca3cf75..454ee66 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2595,14 +2595,7 @@ different subdirectory.
else:
mlog.debug('Unknown target type:', str(targetholder))
raise RuntimeError('Unreachable code')
- # Fix failing test 53 when removing this.
- if '/' in name or '\\' in name:
- mlog.warning('Target name must not contain a path separator. This will become a hard error in a future release.')
- subpart, name = os.path.split(name)
- subdir = os.path.join(self.subdir, subpart)
- else:
- subdir = self.subdir
- target = targetclass(name, subdir, self.subproject, is_cross, sources, objs, self.environment, kwargs)
+ target = targetclass(name, self.subdir, self.subproject, is_cross, sources, objs, self.environment, kwargs)
if is_cross:
self.add_cross_stdlib_info(target)
l = targetholder(target, self)