mbed os with nrf51 internal bandgap enabled to read battery level
Dependents: BLE_file_test BLE_Blink ExternalEncoder
docs/ignoring_files_from_build.md@0:f269e3021894, 2016-10-23 (annotated)
- Committer:
- elessair
- Date:
- Sun Oct 23 15:10:02 2016 +0000
- Revision:
- 0:f269e3021894
Initial commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
elessair | 0:f269e3021894 | 1 | # Ignoring files from mbed build |
elessair | 0:f269e3021894 | 2 | |
elessair | 0:f269e3021894 | 3 | The `.mbedignore` file allows you to ignore files and directories from being processed by `mbed build` command. |
elessair | 0:f269e3021894 | 4 | |
elessair | 0:f269e3021894 | 5 | ## Usage |
elessair | 0:f269e3021894 | 6 | You can place the `.mbedignore` file in any directory where `mbed build` command is going to search for source files. |
elessair | 0:f269e3021894 | 7 | |
elessair | 0:f269e3021894 | 8 | The most convenient place is the root directory of the library or application. However, this is not a requirement. |
elessair | 0:f269e3021894 | 9 | |
elessair | 0:f269e3021894 | 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. |
elessair | 0:f269e3021894 | 11 | |
elessair | 0:f269e3021894 | 12 | ## Syntax |
elessair | 0:f269e3021894 | 13 | |
elessair | 0:f269e3021894 | 14 | Each line in the `.mbedignore` file is a file pattern used for matching files. Each matched file or directory is ignored from build. |
elessair | 0:f269e3021894 | 15 | |
elessair | 0:f269e3021894 | 16 | The following wildcards are accepted: |
elessair | 0:f269e3021894 | 17 | |
elessair | 0:f269e3021894 | 18 | |Pattern | Meaning| |
elessair | 0:f269e3021894 | 19 | |--------|--------| |
elessair | 0:f269e3021894 | 20 | | `*` | Matches everything. | |
elessair | 0:f269e3021894 | 21 | | `?` | Matches any single character. | |
elessair | 0:f269e3021894 | 22 | | `[seq]` | Matches any character in seq. | |
elessair | 0:f269e3021894 | 23 | | `[!seq]` | Matches any character not in seq. | |
elessair | 0:f269e3021894 | 24 | |
elessair | 0:f269e3021894 | 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: |
elessair | 0:f269e3021894 | 26 | |
elessair | 0:f269e3021894 | 27 | 1. Each line is internally prefixed with the path of the `.mbedignore` file. |
elessair | 0:f269e3021894 | 28 | 2. Line cannot start with `.` or `/` (because of rule 1) |
elessair | 0:f269e3021894 | 29 | |
elessair | 0:f269e3021894 | 30 | Globbing functionality is not used, so you cannot recursively match specific file pattern. You need to define rule per directory in that case. |
elessair | 0:f269e3021894 | 31 | |
elessair | 0:f269e3021894 | 32 | Relative paths can be used, so you can match files deeper in the build tree. However, avoid crossing library boundaries. |
elessair | 0:f269e3021894 | 33 | |
elessair | 0:f269e3021894 | 34 | ### Example |
elessair | 0:f269e3021894 | 35 | A file located in `source/obsolete/.mbedignore` with following content: |
elessair | 0:f269e3021894 | 36 | |
elessair | 0:f269e3021894 | 37 | ``` |
elessair | 0:f269e3021894 | 38 | *.c |
elessair | 0:f269e3021894 | 39 | *.h |
elessair | 0:f269e3021894 | 40 | second_level/*.c |
elessair | 0:f269e3021894 | 41 | ``` |
elessair | 0:f269e3021894 | 42 | |
elessair | 0:f269e3021894 | 43 | After applying the rule 1, actual patterns used internally for matching the source files are: |
elessair | 0:f269e3021894 | 44 | |
elessair | 0:f269e3021894 | 45 | ``` |
elessair | 0:f269e3021894 | 46 | source/obsolete/*.c |
elessair | 0:f269e3021894 | 47 | source/obsolete/*.h |
elessair | 0:f269e3021894 | 48 | source/obsolete/second_level/*.c |
elessair | 0:f269e3021894 | 49 | ``` |