Preliminary main mbed library for nexpaq development

Committer:
nexpaq
Date:
Fri Nov 04 20:54:50 2016 +0000
Revision:
1:d96dbedaebdb
Parent:
0:6c56fb4bc5f0
Removed extra directories for other platforms

Who changed what in which revision?

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