pull/15/head
Jussi Pakkanen 11 years ago
parent 3ed4cd98e4
commit bb6446f0c0
  1. 5
      backends.py
  2. 6
      build.py
  3. 1
      test cases/common/29 pipeline/meson.build
  4. 1
      test cases/common/30 pipeline/meson.build

@ -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):

@ -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@'])

@ -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@'])

Loading…
Cancel
Save