aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py4
-rw-r--r--mesonbuild/backend/vs2010backend.py38
-rw-r--r--mesonbuild/backend/xcodebackend.py41
3 files changed, 42 insertions, 41 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 934f274..cde8d70 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -642,8 +642,8 @@ class Backend():
return (srcs, ofilenames, cmd)
def run_postconf_scripts(self):
- env = {'MESON_SOURCE_ROOT' : self.environment.get_source_dir(),
- 'MESON_BUILD_ROOT' : self.environment.get_build_dir()
+ env = {'MESON_SOURCE_ROOT': self.environment.get_source_dir(),
+ 'MESON_BUILD_ROOT': self.environment.get_build_dir()
}
child_env = os.environ.copy()
child_env.update(env)
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 3ba63f4..b28262d 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -327,12 +327,12 @@ class Vs2010Backend(backends.Backend):
def create_basic_crap(self, target):
project_name = target.name
- root = ET.Element('Project', {'DefaultTargets' : "Build",
- 'ToolsVersion' : '4.0',
- 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
- confitems = ET.SubElement(root, 'ItemGroup', {'Label' : 'ProjectConfigurations'})
+ root = ET.Element('Project', {'DefaultTargets': "Build",
+ 'ToolsVersion': '4.0',
+ 'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'})
+ confitems = ET.SubElement(root, 'ItemGroup', {'Label': 'ProjectConfigurations'})
prjconf = ET.SubElement(confitems, 'ProjectConfiguration',
- {'Include' : self.buildtype + '|' + self.platform})
+ {'Include': self.buildtype + '|' + self.platform})
p = ET.SubElement(prjconf, 'Configuration')
p.text= self.buildtype
pl = ET.SubElement(prjconf, 'Platform')
@@ -558,12 +558,12 @@ class Vs2010Backend(backends.Backend):
buildtype_link_args = compiler.get_buildtype_linker_args(self.buildtype)
project_name = target.name
target_name = target.name
- root = ET.Element('Project', {'DefaultTargets' : "Build",
- 'ToolsVersion' : '4.0',
- 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
- confitems = ET.SubElement(root, 'ItemGroup', {'Label' : 'ProjectConfigurations'})
+ root = ET.Element('Project', {'DefaultTargets': "Build",
+ 'ToolsVersion': '4.0',
+ 'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'})
+ confitems = ET.SubElement(root, 'ItemGroup', {'Label': 'ProjectConfigurations'})
prjconf = ET.SubElement(confitems, 'ProjectConfiguration',
- {'Include' : self.buildtype + '|' + self.platform})
+ {'Include': self.buildtype + '|' + self.platform})
p = ET.SubElement(prjconf, 'Configuration')
p.text= self.buildtype
pl = ET.SubElement(prjconf, 'Platform')
@@ -925,11 +925,11 @@ class Vs2010Backend(backends.Backend):
def gen_regenproj(self, project_name, ofname):
root = ET.Element('Project', {'DefaultTargets': 'Build',
- 'ToolsVersion' : '4.0',
- 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
- confitems = ET.SubElement(root, 'ItemGroup', {'Label' : 'ProjectConfigurations'})
+ 'ToolsVersion': '4.0',
+ 'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'})
+ confitems = ET.SubElement(root, 'ItemGroup', {'Label': 'ProjectConfigurations'})
prjconf = ET.SubElement(confitems, 'ProjectConfiguration',
- {'Include' : self.buildtype + '|' + self.platform})
+ {'Include': self.buildtype + '|' + self.platform})
p = ET.SubElement(prjconf, 'Configuration')
p.text= self.buildtype
pl = ET.SubElement(prjconf, 'Platform')
@@ -1003,12 +1003,12 @@ if %%errorlevel%% neq 0 goto :VCEnd'''
def gen_testproj(self, target_name, ofname):
project_name = target_name
- root = ET.Element('Project', {'DefaultTargets' : "Build",
- 'ToolsVersion' : '4.0',
- 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003'})
- confitems = ET.SubElement(root, 'ItemGroup', {'Label' : 'ProjectConfigurations'})
+ root = ET.Element('Project', {'DefaultTargets': "Build",
+ 'ToolsVersion': '4.0',
+ 'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'})
+ confitems = ET.SubElement(root, 'ItemGroup', {'Label': 'ProjectConfigurations'})
prjconf = ET.SubElement(confitems, 'ProjectConfiguration',
- {'Include' : self.buildtype + '|' + self.platform})
+ {'Include': self.buildtype + '|' + self.platform})
p = ET.SubElement(prjconf, 'Configuration')
p.text= self.buildtype
pl = ET.SubElement(prjconf, 'Platform')
diff --git a/mesonbuild/backend/xcodebackend.py b/mesonbuild/backend/xcodebackend.py
index 8133e0f..03efaf9 100644
--- a/mesonbuild/backend/xcodebackend.py
+++ b/mesonbuild/backend/xcodebackend.py
@@ -27,21 +27,22 @@ class XCodeBackend(backends.Backend):
self.project_conflist = self.gen_id()
self.indent = ' '
self.indent_level = 0
- self.xcodetypemap = {'c' : 'sourcecode.c.c',
- 'a' : 'archive.ar',
+ self.xcodetypemap = {'c': 'sourcecode.c.c',
+ 'a': 'archive.ar',
'cc': 'sourcecode.cpp.cpp',
- 'cxx' : 'sourcecode.cpp.cpp',
- 'cpp' : 'sourcecode.cpp.cpp',
- 'c++' : 'sourcecode.cpp.cpp',
- 'm' : 'sourcecode.c.objc',
- 'mm' : 'sourcecode.cpp.objcpp',
- 'h' : 'sourcecode.c.h',
- 'hpp' : 'sourcecode.cpp.h',
- 'hxx' : 'sourcecode.cpp.h',
- 'hh' : 'sourcecode.cpp.hh',
- 'inc' : 'sourcecode.c.h',
- 'dylib' : 'compiled.mach-o.dylib',
- 'o' : 'compiled.mach-o.objfile',}
+ 'cxx': 'sourcecode.cpp.cpp',
+ 'cpp': 'sourcecode.cpp.cpp',
+ 'c++': 'sourcecode.cpp.cpp',
+ 'm': 'sourcecode.c.objc',
+ 'mm': 'sourcecode.cpp.objcpp',
+ 'h': 'sourcecode.c.h',
+ 'hpp': 'sourcecode.cpp.h',
+ 'hxx': 'sourcecode.cpp.h',
+ 'hh': 'sourcecode.cpp.hh',
+ 'inc': 'sourcecode.c.h',
+ 'dylib': 'compiled.mach-o.dylib',
+ 'o': 'compiled.mach-o.objfile',
+ }
self.maingroup_id = self.gen_id()
self.all_id = self.gen_id()
self.all_buildconf_id = self.gen_id()
@@ -129,7 +130,7 @@ class XCodeBackend(backends.Backend):
self.buildmap[o] = self.gen_id()
def generate_buildstylemap(self):
- self.buildstylemap = {'debug' : self.gen_id()}
+ self.buildstylemap = {'debug': self.gen_id()}
def generate_build_phase_map(self):
self.buildphasemap = {}
@@ -139,17 +140,17 @@ class XCodeBackend(backends.Backend):
def generate_build_configuration_map(self):
self.buildconfmap = {}
for t in self.build.targets:
- bconfs = {'debug' : self.gen_id()}
+ bconfs = {'debug': self.gen_id()}
self.buildconfmap[t] = bconfs
def generate_project_configurations_map(self):
- self.project_configurations = {'debug' : self.gen_id()}
+ self.project_configurations = {'debug': self.gen_id()}
def generate_buildall_configurations_map(self):
- self.buildall_configurations = {'debug' : self.gen_id()}
+ self.buildall_configurations = {'debug': self.gen_id()}
def generate_test_configurations_map(self):
- self.test_configurations = {'debug' : self.gen_id()}
+ self.test_configurations = {'debug': self.gen_id()}
def generate_build_configurationlist_map(self):
self.buildconflistmap = {}
@@ -608,7 +609,7 @@ class XCodeBackend(backends.Backend):
self.write_line('};')
# Now finally targets.
- langnamemap = {'c' : 'C', 'cpp' : 'CPLUSPLUS', 'objc' : 'OBJC', 'objcpp' : 'OBJCPLUSPLUS'}
+ langnamemap = {'c': 'C', 'cpp': 'CPLUSPLUS', 'objc': 'OBJC', 'objcpp': 'OBJCPLUSPLUS'}
for target_name, target in self.build.targets.items():
for buildtype in self.buildtypes:
dep_libs = []