|
|
|
@ -91,7 +91,7 @@ class NinjaBuildElement(): |
|
|
|
|
for e in self.elems: |
|
|
|
|
(name, elems) = e |
|
|
|
|
should_quote = True |
|
|
|
|
if name == 'DEPFILE' or name == 'DESC': |
|
|
|
|
if name == 'DEPFILE' or name == 'DESC' or name == 'pool': |
|
|
|
|
should_quote = False |
|
|
|
|
line = ' %s = ' % name |
|
|
|
|
q_templ = quote_char + "%s" + quote_char |
|
|
|
@ -125,7 +125,7 @@ class NinjaBackend(backends.Backend): |
|
|
|
|
outfile.write('# This is the build file for project "%s"\n' % self.build.get_project()) |
|
|
|
|
outfile.write('# It is autogenerated by the Meson build system.\n') |
|
|
|
|
outfile.write('# Do not edit by hand.\n\n') |
|
|
|
|
outfile.write('ninja_required_version = 1.3.4\n\n') |
|
|
|
|
outfile.write('ninja_required_version = 1.5.1\n\n') |
|
|
|
|
self.generate_rules(outfile) |
|
|
|
|
self.generate_phony(outfile) |
|
|
|
|
outfile.write('# Build rules for targets\n\n') |
|
|
|
@ -371,6 +371,7 @@ class NinjaBackend(backends.Backend): |
|
|
|
|
elem.add_dep('all') |
|
|
|
|
elem.add_item('DESC', 'Installing files.') |
|
|
|
|
elem.add_item('COMMAND', [sys.executable, install_script, install_data_file]) |
|
|
|
|
elem.add_item('pool', 'console') |
|
|
|
|
self.generate_target_install(d) |
|
|
|
|
self.generate_header_install(d) |
|
|
|
|
self.generate_man_install(d) |
|
|
|
@ -484,12 +485,14 @@ class NinjaBackend(backends.Backend): |
|
|
|
|
elem = NinjaBuildElement('test', 'CUSTOM_COMMAND', ['all', 'PHONY']) |
|
|
|
|
elem.add_item('COMMAND', cmd) |
|
|
|
|
elem.add_item('DESC', 'Running test suite.') |
|
|
|
|
elem.add_item('pool', 'console') |
|
|
|
|
elem.write(outfile) |
|
|
|
|
|
|
|
|
|
if valgrind: |
|
|
|
|
velem = NinjaBuildElement('test-valgrind', 'CUSTOM_COMMAND', ['all', 'PHONY']) |
|
|
|
|
velem.add_item('COMMAND', cmd + ['--wrapper=' + valgrind]) |
|
|
|
|
velem.add_item('DESC', 'Running test suite under Valgrind.') |
|
|
|
|
velem.add_item('pool', 'console') |
|
|
|
|
velem.write(outfile) |
|
|
|
|
|
|
|
|
|
def generate_dep_gen_rules(self, outfile): |
|
|
|
@ -1415,6 +1418,7 @@ rule FORTRAN_DEP_HACK |
|
|
|
|
if os.path.isfile(fname): |
|
|
|
|
deps.append(os.path.join(self.build_to_src, sp, 'meson_options.txt')) |
|
|
|
|
elem = NinjaBuildElement('build.ninja', 'REGENERATE_BUILD', deps) |
|
|
|
|
elem.add_item('pool', 'console') |
|
|
|
|
elem.write(outfile) |
|
|
|
|
|
|
|
|
|
elem = NinjaBuildElement(deps, 'phony', '') |
|
|
|
|