Re: Issue with target names and data tool



On Thu, Apr 7, 2011 at 12:59 PM, Alberto Ruiz <aruiz gnome org> wrote:
> Hello Dylan,
>
> Thank you very much for the interest!
> I think that the solution would be to have an optional 'output'
> parameter for targets.
>
> If 'output' is set then it should use that as the output name instead
> of the target name.
>
> Have a look at the "get_build_arguments" method of the ProjecTarget
> class. The patch should be pretty straightforward, I'm sure that you
> can do it and be the third contributor to the project!

Thanks for the words of encouragement, Alberto :)

I'm attaching a patch with that and an example in cc/project.yaml.

I added a get_output method to ProjectTarget. I tested this on the
example build system in BuilDj's git repository, setting output for
everything to $(target)_renamed and changing inputs where appropriate.
It magically works. Yay!

There was one funny case where my_cpp_program uses a static library
defined in my_static_lib under the cc subproject. Like everything
else, I added an output parameter to that library, changing its name.
Targets defined in cc's project.yaml understood the renamed library
and they were happy with it. Targets in the base directory's
project.yaml weren't; my_cpp_program ended up being ignored because
BuilDj decided my_static_lib_renamed didn't exist.

I think I solved that with a change in line 87 and 88, replacing
get_name with get_output, but I'm a little unsure on that point. It
does work with the hastily thrown together sample, so that's a good
sign!

Dylan

Attachment: buildj-output-parameter.diff
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]