From 51b73e8ab26d5be88e9c56132b3f13212104d251 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 24 May 2014 18:26:34 +0300 Subject: [PATCH] Keyword argument unification. --- build.py | 8 ++++---- test cases/common/29 pipeline/meson.build | 2 +- test cases/common/30 pipeline/meson.build | 2 +- test cases/common/31 find program/meson.build | 2 +- test cases/frameworks/5 protocol buffers/meson.build | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.py b/build.py index d1a4de076..43d08f280 100644 --- a/build.py +++ b/build.py @@ -433,14 +433,14 @@ class Generator(): raise InvalidArguments('A non-string object in "arguments" keyword argument.') self.arglist = args - if 'outputs' not in kwargs: - raise InvalidArguments('Generator must have "outputs" keyword argument.') - outputs = kwargs['outputs'] + if 'output' not in kwargs: + raise InvalidArguments('Generator must have "output" keyword argument.') + outputs = kwargs['output'] if not isinstance(outputs, list): outputs = [outputs] for rule in outputs: if not isinstance(rule, str): - raise InvalidArguments('"outputs" may only contain strings.') + raise InvalidArguments('"output" may only contain strings.') if not '@BASENAME@' in rule and not '@PLAINNAME@' in rule: raise InvalidArguments('"outputs" must contain @BASENAME@ or @PLAINNAME@.') if '/' in rule or '\\' in rule: diff --git a/test cases/common/29 pipeline/meson.build b/test cases/common/29 pipeline/meson.build index aebfbec66..faf26af15 100644 --- a/test cases/common/29 pipeline/meson.build +++ b/test cases/common/29 pipeline/meson.build @@ -6,7 +6,7 @@ e1 = executable('srcgen', 'srcgen.c', native : true) # Generate a source file that needs to be included in the build. gen = generator(e1, \ - outputs : '@BASENAME@.c', # Line continuation inside arguments should work without needing a "\". + output : '@BASENAME@.c', # Line continuation inside arguments should work without needing a "\". arguments : ['@INPUT@', '@OUTPUT@']) generated = gen.process('input_src.dat') diff --git a/test cases/common/30 pipeline/meson.build b/test cases/common/30 pipeline/meson.build index 0a51f72c8..f639876bf 100644 --- a/test cases/common/30 pipeline/meson.build +++ b/test cases/common/30 pipeline/meson.build @@ -4,7 +4,7 @@ e1 = executable('srcgen', 'srcgen.c', native : true) # Generate a header file that needs to be included. gen = generator(e1, - outputs : '@BASENAME@.h', + output : '@BASENAME@.h', arguments : ['@INPUT@', '@OUTPUT@']) generated = gen.process('input_src.dat') diff --git a/test cases/common/31 find program/meson.build b/test cases/common/31 find program/meson.build index 7a407a90e..16b6cb525 100644 --- a/test cases/common/31 find program/meson.build +++ b/test cases/common/31 find program/meson.build @@ -11,7 +11,7 @@ if build.name() == 'windows' else cp = find_program('cp') gen = generator(cp, \ - outputs : '@BASENAME@.c', \ + output : '@BASENAME@.c', \ arguments : ['@INPUT@', '@OUTPUT@']) generated = gen.process('source.in') diff --git a/test cases/frameworks/5 protocol buffers/meson.build b/test cases/frameworks/5 protocol buffers/meson.build index 1e52e48f1..45c78808d 100644 --- a/test cases/frameworks/5 protocol buffers/meson.build +++ b/test cases/frameworks/5 protocol buffers/meson.build @@ -4,7 +4,7 @@ protoc = find_program('protoc') dep = dependency('protobuf') gen = generator(protoc, \ - outputs : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], + output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], arguments : ['-I=@SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@']) generated = gen.process('defs.proto')