Development mbed library for MAX32630FTHR
Dependents: blinky_max32630fthr
docs/ignoring_files_from_build.md@3:1198227e6421, 2016-12-16 (annotated)
- Committer:
- switches
- Date:
- Fri Dec 16 16:27:57 2016 +0000
- Revision:
- 3:1198227e6421
- Parent:
- 0:5c4d7b2438d3
Changed ADC scale for MAX32625 platforms to 1.2V full scale to match MAX32630 platforms
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
switches | 0:5c4d7b2438d3 | 1 | # Ignoring files from mbed build |
switches | 0:5c4d7b2438d3 | 2 | |
switches | 0:5c4d7b2438d3 | 3 | The `.mbedignore` file allows you to ignore files and directories from being processed by `mbed build` command. |
switches | 0:5c4d7b2438d3 | 4 | |
switches | 0:5c4d7b2438d3 | 5 | ## Usage |
switches | 0:5c4d7b2438d3 | 6 | You can place the `.mbedignore` file in any directory where `mbed build` command is going to search for source files. |
switches | 0:5c4d7b2438d3 | 7 | |
switches | 0:5c4d7b2438d3 | 8 | The most convenient place is the root directory of the library or application. However, this is not a requirement. |
switches | 0:5c4d7b2438d3 | 9 | |
switches | 0:5c4d7b2438d3 | 10 | Avoid defining rules that would cross the library boundaries as those would lead to side effects or build problems that are hard to find. |
switches | 0:5c4d7b2438d3 | 11 | |
switches | 0:5c4d7b2438d3 | 12 | ## Syntax |
switches | 0:5c4d7b2438d3 | 13 | |
switches | 0:5c4d7b2438d3 | 14 | Each line in the `.mbedignore` file is a file pattern used for matching files. Each matched file or directory is ignored from build. |
switches | 0:5c4d7b2438d3 | 15 | |
switches | 0:5c4d7b2438d3 | 16 | The following wildcards are accepted: |
switches | 0:5c4d7b2438d3 | 17 | |
switches | 0:5c4d7b2438d3 | 18 | |Pattern | Meaning| |
switches | 0:5c4d7b2438d3 | 19 | |--------|--------| |
switches | 0:5c4d7b2438d3 | 20 | | `*` | Matches everything. | |
switches | 0:5c4d7b2438d3 | 21 | | `?` | Matches any single character. | |
switches | 0:5c4d7b2438d3 | 22 | | `[seq]` | Matches any character in seq. | |
switches | 0:5c4d7b2438d3 | 23 | | `[!seq]` | Matches any character not in seq. | |
switches | 0:5c4d7b2438d3 | 24 | |
switches | 0:5c4d7b2438d3 | 25 | File is parsed with Python's [fnmatch](https://docs.python.org/2/library/fnmatch.html) functionality so the syntax follows basic shell patterns with the following exceptions: |
switches | 0:5c4d7b2438d3 | 26 | |
switches | 0:5c4d7b2438d3 | 27 | 1. Each line is internally prefixed with the path of the `.mbedignore` file. |
switches | 0:5c4d7b2438d3 | 28 | 2. Line cannot start with `.` or `/` (because of rule 1) |
switches | 0:5c4d7b2438d3 | 29 | |
switches | 0:5c4d7b2438d3 | 30 | Globbing functionality is not used, so you cannot recursively match specific file pattern. You need to define rule per directory in that case. |
switches | 0:5c4d7b2438d3 | 31 | |
switches | 0:5c4d7b2438d3 | 32 | Relative paths can be used, so you can match files deeper in the build tree. However, avoid crossing library boundaries. |
switches | 0:5c4d7b2438d3 | 33 | |
switches | 0:5c4d7b2438d3 | 34 | ### Example |
switches | 0:5c4d7b2438d3 | 35 | A file located in `source/obsolete/.mbedignore` with following content: |
switches | 0:5c4d7b2438d3 | 36 | |
switches | 0:5c4d7b2438d3 | 37 | ``` |
switches | 0:5c4d7b2438d3 | 38 | *.c |
switches | 0:5c4d7b2438d3 | 39 | *.h |
switches | 0:5c4d7b2438d3 | 40 | second_level/*.c |
switches | 0:5c4d7b2438d3 | 41 | ``` |
switches | 0:5c4d7b2438d3 | 42 | |
switches | 0:5c4d7b2438d3 | 43 | After applying the rule 1, actual patterns used internally for matching the source files are: |
switches | 0:5c4d7b2438d3 | 44 | |
switches | 0:5c4d7b2438d3 | 45 | ``` |
switches | 0:5c4d7b2438d3 | 46 | source/obsolete/*.c |
switches | 0:5c4d7b2438d3 | 47 | source/obsolete/*.h |
switches | 0:5c4d7b2438d3 | 48 | source/obsolete/second_level/*.c |
switches | 0:5c4d7b2438d3 | 49 | ``` |