-
Notifications
You must be signed in to change notification settings - Fork 16.6k
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
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Closed
this still builds the object files each time with make |
pushed with the above fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all, this PR is an extended version of #3410 with some changes regarding WAF.