aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-06-01 15:16:22 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2017-06-02 11:56:27 +0300
commit506fbafed53c2f98986dfeaa5677cb6813b6e182 (patch)
tree3e22e9047061f2fc1ff16bdf32231f952ad7c6cb
parent6662f36ed36b9fbee700993fa24ca99250161873 (diff)
downloadmeson-506fbafed53c2f98986dfeaa5677cb6813b6e182.zip
meson-506fbafed53c2f98986dfeaa5677cb6813b6e182.tar.gz
meson-506fbafed53c2f98986dfeaa5677cb6813b6e182.tar.bz2
Revert slashes in filenames being a hard error to give downstream projects time to transition.
-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)