From cf97f78de7d47ab0b5baf4d556f178ee65b48367 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 23 Feb 2013 19:42:18 +0200 Subject: [PATCH] Renamed generators to backends. --- generators.py => backends.py | 12 ++++++------ meson.py | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) rename generators.py => backends.py (99%) diff --git a/generators.py b/backends.py similarity index 99% rename from generators.py rename to backends.py index 0a3c58976..dfee4c1a6 100755 --- a/generators.py +++ b/backends.py @@ -49,7 +49,7 @@ def do_conf_file(src, dst, variables): open(dst, 'w').writelines(result) -class Generator(): +class Backend(): def __init__(self, build, interp): self.build = build self.environment = build.environment @@ -152,10 +152,10 @@ class Generator(): outfile = os.path.join(outdir, cf.get_target_name()) do_conf_file(infile, outfile, self.interpreter.get_variables()) -class NinjaGenerator(Generator): +class NinjaBackend(Backend): def __init__(self, build, interp): - Generator.__init__(self, build, interp) + Backend.__init__(self, build, interp) self.ninja_filename = 'build.ninja' def generate(self): @@ -463,9 +463,9 @@ class NinjaGenerator(Generator): ignore_missing = 'build %s: phony\n\n' % depstr outfile.write(ignore_missing) -class ShellGenerator(Generator): +class ShellBackend(Backend): def __init__(self, build, interp): - Generator.__init__(self, build, interp) + Backend.__init__(self, build, interp) self.build_filename = 'compile.sh' self.test_filename = 'run_tests.sh' self.install_filename = 'install.sh' @@ -716,5 +716,5 @@ if __name__ == '__main__': os.chdir(os.path.split(__file__)[0]) envir = environment.Environment('.', 'work area') intpr = interpreter.Interpreter(code, envir) - g = ShellGenerator(intpr, envir) + g = ShellBackend(intpr, envir) g.generate() diff --git a/meson.py b/meson.py index 6d6fb1d61..173f4aba8 100755 --- a/meson.py +++ b/meson.py @@ -18,7 +18,7 @@ from optparse import OptionParser import sys, stat import os.path import environment, interpreter -import generators, build +import backends, build version = '0.1-research' @@ -93,9 +93,9 @@ class MesonApp(): intr = interpreter.Interpreter(b) intr.run() if options.generator == 'shell': - g = generators.ShellGenerator(b, intr) + g = backends.ShellBackend(b, intr) elif options.generator == 'ninja': - g = generators.NinjaGenerator(b, intr) + g = backends.NinjaBackend(b, intr) else: raise RuntimeError('Unknown generator "%s".' % options.generator) g.generate()