-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds the ability to run custom commands at build time. This PR adds the ability to run custom commands at build time. A package specifies custom commands in its `pkg.yml` file. There are three types of commands: 1. pre_build_cmds (run before the build) 2. pre_link_cmds (run after compilation, before linking) 3. post_build_cmds (run after the build) Example (apps/blinky/pkg.yml): ``` pkg.pre_build_cmds: scripts/pre_build1.sh: 100 scripts/pre_build2.sh: 200 pkg.pre_link_cmds: scripts/pre_link.sh: 500 pkg.post_build_cmds: scripts/post_build.sh: 100 ``` For each command, the string on the left specifies the command to run. The number on the right indicates the command's relative ordering. When newt builds this example, it performs the following sequence: * scripts/pre_build1.sh * scripts/pre_build2.sh * [compile] * scripts/pre_link.sh * [link] * scripts/post_build.sh If other packages specify custom commands, those commands would also be executed during the above sequence. For example, if another package specifies a pre command with an ordering of 150, that command would run immediately after `pre_build1.sh`. In the case of a tie, the commands are run in lexicographic order. All commands are run from the project's base directory. In the above example, the `scripts` directory is a sibling of `targets`. See <#335> for details.
- Loading branch information
1 parent
dd85dc3
commit 9be9346
Showing
13 changed files
with
672 additions
and
24 deletions.
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.