diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-22 16:46:38 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-22 16:46:38 +0200 |
commit | bb6446f0c07877b5bea43cb74ec8babaff8a398d (patch) | |
tree | c51ed788b4217789b4e4246c7c18424dc9c5fbe7 | |
parent | 3ed4cd98e40a64e2152891fea21adba749dfac19 (diff) | |
download | meson-bb6446f0c07877b5bea43cb74ec8babaff8a398d.zip meson-bb6446f0c07877b5bea43cb74ec8babaff8a398d.tar.gz meson-bb6446f0c07877b5bea43cb74ec8babaff8a398d.tar.bz2 |
Minor.
-rw-r--r-- | backends.py | 5 | ||||
-rw-r--r-- | build.py | 6 | ||||
-rw-r--r-- | test cases/common/29 pipeline/meson.build | 1 | ||||
-rw-r--r-- | test cases/common/30 pipeline/meson.build | 1 |
4 files changed, 8 insertions, 5 deletions
diff --git a/backends.py b/backends.py index cc83776..5cf8c05 100644 --- a/backends.py +++ b/backends.py @@ -242,7 +242,7 @@ class Backend(): unity_src.append(abs_src) else: obj_list.append(self.generate_single_compile(target, outfile, src, False, header_deps)) - obj_list += self.flatten_obj_list(target) + obj_list += self.flatten_object_list(target) if is_unity: for src in self.generate_unity_files(target, unity_src): obj_list.append(self.generate_single_compile(target, outfile, src, True, unity_deps + header_deps)) @@ -938,9 +938,6 @@ class NinjaBackend(Backend): if len(infilelist) == len(outfilelist): sole_output = os.path.join(self.get_target_private_dir(target), outfilelist[i]) else: - for x in base_args: - if '@OUTPUT@' in x: - raise MesonException('Tried to use @OUTPUT@ in a rule with more than one output.') sole_output = '' curfile = infilelist[i] infilename = os.path.join(self.environment.get_source_dir(), curfile) @@ -387,7 +387,7 @@ class Generator(): def __init__(self, args, kwargs): if len(args) != 1: raise InvalidArguments('Generator requires one and only one positional argument') - + if hasattr(args[0], 'held_object'): exe = args[0].held_object if not isinstance(exe, Executable): @@ -427,6 +427,10 @@ class Generator(): raise InvalidArguments('"outputs" must contain @BASENAME@ or @PLAINNAME@.') if '/' in rule or '\\' in rule: raise InvalidArguments('"outputs" must not contain a directory separator.') + if len(outputs) > 1: + for o in outputs: + if '@OUTPUT@' in o: + raise InvalidArguments('Tried to use @OUTPUT@ in a rule with more than one output.') self.outputs = outputs def get_base_outnames(self, inname): diff --git a/test cases/common/29 pipeline/meson.build b/test cases/common/29 pipeline/meson.build index 813c209..aebfbec 100644 --- a/test cases/common/29 pipeline/meson.build +++ b/test cases/common/29 pipeline/meson.build @@ -4,6 +4,7 @@ project('pipeline test', 'c') # the host compiler. 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 "\". arguments : ['@INPUT@', '@OUTPUT@']) diff --git a/test cases/common/30 pipeline/meson.build b/test cases/common/30 pipeline/meson.build index 2f34bd4..0a51f72 100644 --- a/test cases/common/30 pipeline/meson.build +++ b/test cases/common/30 pipeline/meson.build @@ -2,6 +2,7 @@ project('pipeline test', 'c') e1 = executable('srcgen', 'srcgen.c', native : true) +# Generate a header file that needs to be included. gen = generator(e1, outputs : '@BASENAME@.h', arguments : ['@INPUT@', '@OUTPUT@']) |