Commit Graph

13 Commits

Author SHA1 Message Date
Dylan Baker 7053d9abfd Allow link_depends to take strings, Files or generated objects. Closes #1172
Currently only strings can be passed to the link_depends argument of
executable and *library, which solves many cases, but not every one.
This patch allows generated sources and Files to be passed as well.

On the implementation side, it uses a helper method to keep the more
complex logic separated from the __init__ method. This also requires
that Targets set their link_depends paths as Files, and the backend is
responsible for converting to strings when it wants them.

This adds tests for the following cases:
- Using a file in a subdir
- Using a configure_file as an input
- Using a custom_target as an input

It does not support using a generator as an input, since currently that
would require calling the generator twice, once for the -Wl argument,
and once for the link_depends.

Also updates the docs.
2017-05-08 20:59:46 +02:00
Alberto Aguirre ccab7d64f4 Add support for @CURRENT_SOURCE_DIR@ in generator arguments
Allow users to specify @CURRENT_SOURCE_DIR@ in generator arguments
to specify the current target source directory.
This is useful when creating protobuf generator objects in sub-directories
because protoc will then generate files in the expected location.

Fixes #1622.

Remove stray semicolon

Update documentation
2017-05-08 20:53:57 +02:00
Jon Turney 855715b29e docs: make project(license:) a separate bullet point 2017-05-08 20:08:56 +02:00
Peter Hutterer 7a3be163cb Default to project_version() in vcs_tag fallback 2017-05-05 08:11:28 +10:00
Peter Hutterer 4378655a39 docs: document additional args for vcs_tag
Supported as of 223596d7bf
2017-05-05 08:11:04 +10:00
Peter Hutterer e982d5118e docs: clarify that vcs_tag output can be used as source
"you should put in your main program" is confusing, "that can be used as
source" is slightly better.
2017-05-05 08:11:04 +10:00
Peter Hutterer ca924451ac Use American English: behaviour -> behavior 2017-05-04 22:09:27 +03:00
Dylan Baker 5f1b96a076 docs: Update SharedLibrary vs_module_defs accepts a File object 2017-05-04 00:18:22 +03:00
Elliott Sales de Andrade f9de195d7c doc: Replace kwarg with keyword argument.
This abbreviation is a Python-ism that is not really clear to those out
of the loop.
2017-05-03 16:20:53 -04:00
Elliott Sales de Andrade f3ad633f55 doc: Fix several minor typos. 2017-05-03 16:20:53 -04:00
Elliott Sales de Andrade b80d40c287 doc: Capitalize things more consistently.
Upper or lower case depending on the official spelling, or the more
consistent usage.
2017-05-03 16:20:51 -04:00
Peter Hutterer 71f0a63fb2 docs: fix link to file a new issue 2017-05-03 21:00:36 +10:00
Thibault Saunier b371875e02 docs: Import the website and wiki and build with hotdoc
This allows us to more easily have the documentation in sync with
the source code as people will have to document new features etc
right at the time where they implement it.
2017-04-26 17:56:33 +03:00