Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mavlink submodule updates #3504

Closed
wants to merge 14 commits into from
Closed

Mavlink submodule updates #3504

wants to merge 14 commits into from

Conversation

guludo
Copy link
Contributor

@guludo guludo commented Jan 14, 2016

Hi all, this PR is an extended version of #3410 with some changes regarding WAF.

bugobliterator and others added 14 commits January 12, 2016 16:03
Although waf's coding style uses tabs instead of spaces, scripts created for
this repository have been using spaces from the beginning.
Since the output list for mavgen is dynamic, in the sense that we don't have
the information of what files will be generated by the task, that is not
captured by default by waf and post_run can't save the task signature for those
files. Although that doesn't cause build errors, the build time increase
significantly for when tasks that use the generate files are included (for
example, vehicles builds).

This patch search for the headers that were created by the task and set the
task signature for them. Using ant_glob isn't a very good solution, since there
may be stray file in the local build directory, but let's use that for now
until we find a better approach.
This is a better approach, because there's no need of calling add_group() for
each time a mavgen task generator is created.
By setting env.env during configure time makes changes be for the whole build
system scope and persistently, which may cause problems for other tasks and
tools.
That allows users to pass more parameters to bld.stlib.
The task generator for the mavlink headers is given a name 'mavlink' and is
added as a dependency to all local static libraries, because all of them use
sources that include mavlink headers. It would be nice to have a good way to
detect sources that use mavlink headers or to declare list of libraries that
use the headers, so that the dependency could be added automatically.

Additionally, there's a minor change in syntax for the task generator: using
strings directly instead of lists.
By using the export_includes, the include paths for mavlink are enabled only
for libs or programs that depend on it.
The option target for the waf task generator is meant for actual files that are
going to be build. Since our target files are dynamic, let's change the code to
use a new parameter output_dir instead.
The configure function was reorganized for:
 - removing variables that are not used
 - making it more general, i.e., not relying in ardupilotmega.xml, so that this
   tool can be used for generating other headers in the future
@tridge
Copy link
Contributor

tridge commented Jan 14, 2016

this still builds the object files each time with make
this patch fixes it: tridge@f6c2b55

@tridge
Copy link
Contributor

tridge commented Jan 14, 2016

pushed with the above fix
thanks to everyone who contributed!

@tridge tridge closed this Jan 14, 2016
@guludo guludo mentioned this pull request Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants