{"action":"created","comment":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/73521235","id":73521235,"diff_hunk":"@@ -1,66 +1,138 @@\n-# WAF Build #\n+# Building ArduPilot #\n \n Ardupilot is gradually moving from the make-based build system to\n-[Waf](https://waf.io/).\n+[Waf](https://waf.io/). You can read the [Waf Book](https://waf.io/book/) if\n+you want to learn more about Waf.\n \n-To keep access to Waf convenient, use the following alias from the\n-root ardupilot directory:\n+Waf should always be called from the ardupilot's root directory. Differently\n+from the make-based build, with Waf there's a configure step to choose the\n+board to be used (default is `sitl`).\n \n-```bash\n-alias waf=\"$PWD/modules/waf/waf-light\"\n-```\n+## Basic usage ##\n \n-You can also define the alias or create a function in your shell rc file (e.g.\n-`~/.bashrc`).\n+There are several commands in the build system for advanced usages, but here we\n+list some basic and more used commands as example.\n \n-You can read the [Waf Book](https://waf.io/book/) if you want to learn more\n-about Waf.\n+* **Build ArduCopter**\n \n-## Calling waf ##\n+    Here we use minlure as an example of Linux board. See more advanced usages\n+    below to get a list of supported boards.\n \n-Waf should always be called from the ardupilot's root directory.\n+    ```sh\n+    ./waf configure --board minlure\n+    ./waf copter\n+    ```\n \n-Differently from the make-based build, with Waf there's a configure step\n-to choose the board to be used (default is `sitl`):\n+    The first command should be called only once or when you want to change a\n+    configuration option. One configuration often used is the `--board` option to\n+    switch from one board to another one. For example we could switch Pixhawk and\n+    build again:\n \n-```bash\n-# Configure the Linux board\n-waf configure --board=linux\n-```\n+    ```sh\n+    ./waf configure --board px4-v2\n+    ./waf copter\n+    ```\n \n-Waf build system is composed of commands. For example, the above command\n-(`configure`) is for configuring the build. Consequently, in order to build, a\n-\"build\" command is issued, thus `waf build`. That is the default command, so\n-calling just `waf` is enough:\n+* **List available boards**\n \n-```bash\n-# Build programs from bin group\n-waf\n \n-# Waf also accepts '-j' option to parallelize the build.\n-waf -j8\n-```\n+    It's possible to get a list of supported boards on ArduPilot with the command\n+    below\n \n-To clean things up, use the `clean` or `distclean` command:\n+    ```sh\n+    ./waf list_boards\n \n-```bash\n-# Clean the build products, but keep configure information\n-waf clean\n+    ```\n+\n+* **Clean the build**\n+\n+    Commands `clean` and `distclean` can be used to clean the objects produced by\n+    the build. The first keeps the configure information while the second cleans\n+    everything.\n+\n+    Cleaning the build is very often not necessary and discouraged. We do\n+    incremental builds reducing the build time by orders of magnitude.\n+\n+\n+* **Upload or install**\n+\n+    Pixhawk board has and upload option so it uploads to the firmware built to\n+    a connected board. In order to use it, pass the option `--upload` to build\n+    command:\n+\n+    ```sh\n+    ./waf --targets bin/arducopter-quad --upload\n+    ```\n+\n+    Currently Linux boards don't support the upload option, but there's a install\n+    command, which will install to a certain directory. This can be used by\n+    distributors to create .deb, .rpm or other package types:\n+\n+    ```sh\n+    ./waf copter\n+    DESTDIR=/my/temporary/location ./waf install\n+    ```\n+\n+* **Use different targets**\n+\n+    The build commands in the items above use `copter` as the target. This","path":"BUILD.md","position":111,"original_position":111,"commit_id":"144d918281572283d08f005782c256c4e49e1ece","original_commit_id":"144d918281572283d08f005782c256c4e49e1ece","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"body":"No need to know about \"group\"... That's very specific to waf and is in the advanced section. \"Target\" was used because it's what people are used in Makefile world and as \"what will be produced by the command\".\r\n\r\nExample: git show\r\n\r\nI don't want to see in the help of git explaining how that is implemented, if the binary execs itself with arguments, etc. For the user it's just a target/subcommand/action/argument.","created_at":"2016-08-04T13:28:18Z","updated_at":"2016-08-04T13:28:18Z","html_url":"https://github.com/ArduPilot/ardupilot/pull/4605#discussion_r73521235","pull_request_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605","_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments/73521235"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/4605#discussion_r73521235"},"pull_request":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605"}}},"pull_request":{"url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605","id":79973036,"html_url":"https://github.com/ArduPilot/ardupilot/pull/4605","diff_url":"https://github.com/ArduPilot/ardupilot/pull/4605.diff","patch_url":"https://github.com/ArduPilot/ardupilot/pull/4605.patch","issue_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4605","number":4605,"state":"open","locked":false,"title":"build: add waf wrapper (v2)","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"body":"v2 of #4588 \r\n\r\nChanges:\r\n\r\n- The wrapper is now in python\r\n- There's a very short logic to try to fetch waf submodule\r\n- Handle comments for documentation given on previous PR\r\n\r\n@OXINARF @guludo is the doc better now?","created_at":"2016-08-03T20:28:01Z","updated_at":"2016-08-04T13:28:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ecde09c754e8638fc593e6a2f45553b04c0fc266","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605/commits","review_comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605/comments","review_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4605/comments","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/144d918281572283d08f005782c256c4e49e1ece","head":{"label":"lucasdemarchi:pr-waf-script-v2","ref":"pr-waf-script-v2","sha":"144d918281572283d08f005782c256c4e49e1ece","user":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"repo":{"id":32772713,"name":"ardupilot","full_name":"lucasdemarchi/ardupilot","owner":{"login":"lucasdemarchi","id":31864,"avatar_url":"https://avatars.githubusercontent.com/u/31864?v=3","gravatar_id":"","url":"https://api.github.com/users/lucasdemarchi","html_url":"https://github.com/lucasdemarchi","followers_url":"https://api.github.com/users/lucasdemarchi/followers","following_url":"https://api.github.com/users/lucasdemarchi/following{/other_user}","gists_url":"https://api.github.com/users/lucasdemarchi/gists{/gist_id}","starred_url":"https://api.github.com/users/lucasdemarchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucasdemarchi/subscriptions","organizations_url":"https://api.github.com/users/lucasdemarchi/orgs","repos_url":"https://api.github.com/users/lucasdemarchi/repos","events_url":"https://api.github.com/users/lucasdemarchi/events{/privacy}","received_events_url":"https://api.github.com/users/lucasdemarchi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lucasdemarchi/ardupilot","description":"APM Plane, APM Copter, APM Rover source","fork":true,"url":"https://api.github.com/repos/lucasdemarchi/ardupilot","forks_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/forks","keys_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/teams","hooks_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/events","assignees_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/tags","blobs_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/languages","stargazers_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/subscription","commits_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/merges","archive_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/downloads","issues_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/lucasdemarchi/ardupilot/deployments","created_at":"2015-03-24T02:59:29Z","updated_at":"2016-01-15T22:26:39Z","pushed_at":"2016-08-03T21:10:59Z","git_url":"git://github.com/lucasdemarchi/ardupilot.git","ssh_url":"git@github.com:lucasdemarchi/ardupilot.git","clone_url":"https://github.com/lucasdemarchi/ardupilot.git","svn_url":"https://github.com/lucasdemarchi/ardupilot","homepage":"http://ardupilot.com/","size":78351,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ArduPilot:master","ref":"master","sha":"ec59a832197b5b88b870f23d7e3cae83ed447cb1","user":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars.githubusercontent.com/u/17919847?v=3","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"repo":{"id":7512484,"name":"ardupilot","full_name":"ArduPilot/ardupilot","owner":{"login":"ArduPilot","id":17919847,"avatar_url":"https://avatars.githubusercontent.com/u/17919847?v=3","gravatar_id":"","url":"https://api.github.com/users/ArduPilot","html_url":"https://github.com/ArduPilot","followers_url":"https://api.github.com/users/ArduPilot/followers","following_url":"https://api.github.com/users/ArduPilot/following{/other_user}","gists_url":"https://api.github.com/users/ArduPilot/gists{/gist_id}","starred_url":"https://api.github.com/users/ArduPilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArduPilot/subscriptions","organizations_url":"https://api.github.com/users/ArduPilot/orgs","repos_url":"https://api.github.com/users/ArduPilot/repos","events_url":"https://api.github.com/users/ArduPilot/events{/privacy}","received_events_url":"https://api.github.com/users/ArduPilot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ArduPilot/ardupilot","description":"ArduPlane, ArduCopter, ArduRover source","fork":false,"url":"https://api.github.com/repos/ArduPilot/ardupilot","forks_url":"https://api.github.com/repos/ArduPilot/ardupilot/forks","keys_url":"https://api.github.com/repos/ArduPilot/ardupilot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArduPilot/ardupilot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArduPilot/ardupilot/teams","hooks_url":"https://api.github.com/repos/ArduPilot/ardupilot/hooks","issue_events_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/events{/number}","events_url":"https://api.github.com/repos/ArduPilot/ardupilot/events","assignees_url":"https://api.github.com/repos/ArduPilot/ardupilot/assignees{/user}","branches_url":"https://api.github.com/repos/ArduPilot/ardupilot/branches{/branch}","tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/tags","blobs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/{sha}","languages_url":"https://api.github.com/repos/ArduPilot/ardupilot/languages","stargazers_url":"https://api.github.com/repos/ArduPilot/ardupilot/stargazers","contributors_url":"https://api.github.com/repos/ArduPilot/ardupilot/contributors","subscribers_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscribers","subscription_url":"https://api.github.com/repos/ArduPilot/ardupilot/subscription","commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArduPilot/ardupilot/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArduPilot/ardupilot/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArduPilot/ardupilot/contents/{+path}","compare_url":"https://api.github.com/repos/ArduPilot/ardupilot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArduPilot/ardupilot/merges","archive_url":"https://api.github.com/repos/ArduPilot/ardupilot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArduPilot/ardupilot/downloads","issues_url":"https://api.github.com/repos/ArduPilot/ardupilot/issues{/number}","pulls_url":"https://api.github.com/repos/ArduPilot/ardupilot/pulls{/number}","milestones_url":"https://api.github.com/repos/ArduPilot/ardupilot/milestones{/number}","notifications_url":"https://api.github.com/repos/ArduPilot/ardupilot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArduPilot/ardupilot/labels{/name}","releases_url":"https://api.github.com/repos/ArduPilot/ardupilot/releases{/id}","deployments_url":"https://api.github.com/repos/ArduPilot/ardupilot/deployments","created_at":"2013-01-09T00:58:52Z","updated_at":"2016-08-04T13:21:21Z","pushed_at":"2016-08-04T13:16:03Z","git_url":"git://github.com/ArduPilot/ardupilot.git","ssh_url":"git@github.com:ArduPilot/ardupilot.git","clone_url":"https://github.com/ArduPilot/ardupilot.git","svn_url":"https://github.com/ArduPilot/ardupilot","homepage":"http://ardupilot.org/","size":142862,"stargazers_count":2001,"watchers_count":2001,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4234,"mirror_url":null,"open_issues_count":800,"forks":4234,"open_issues":800,"watchers":2001,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605"},"html":{"href":"https://github.com/ArduPilot/ardupilot/pull/4605"},"issue":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4605"},"comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/issues/4605/comments"},"review_comments":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605/comments"},"review_comment":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/pulls/4605/commits"},"statuses":{"href":"https://api.github.com/repos/ArduPilot/ardupilot/statuses/144d918281572283d08f005782c256c4e49e1ece"}}}}
{"actor":{"display_login":"lucasdemarchi"}}