- Better support for passing environment variables to the Docker container.
- Move Docker-related definitions into Makefile.docker.
- Only environment variables that originates from the command line or
the environment will be passed to the Docker container.
export BUILD_IN_DOCKER=1 to use Docker for building inside a Docker
container.
GDB debug file paths will be wrong after building inside the container,
use the script provided in `dist/gdbinit-docker` to set the correct GDB
substitution paths (copy and paste the contents into your `~/.gdbinit`)
The environment variable DOCKER_FLAGS can be used to pass extra
parameters to the Docker process.
llvm-ar does not understand `-rc`, but works for creating empty
archives when called with `rc` (without the leading dash). BSD `ar`
which ships with OSX, which the test is written for, understands the
argument with or without the leading dash (but does not support creating
empty archives.)
The '""' pattern is used so that the variable can be processed as a string
after the preprocessors evaluation. Change to \"\" instead, so that single
quotes can be used externally. The extra quotation marks are unneeded.
Related to #2213
This change allows drivers (or any module for that matter) to provide
features. This is e.g. useful if a board does not have a transceiver,
but your application uses `USEMODULE += some_driver`, which implements
the transceiver interface.
The line `FEATURES_PROVIDED += some_feature` should go to the guarded
block in `{sys,drivers}/Makefile.include`.
Fixes#1876
This PR introduces `FEATURES_OPTIONAL` which can be used to tell the
Make system, that the application would like to use some feature, but
the build should proceed even if the selected board cannot provide the
optional feature.
`make buildtest` and `make info-supported-boards` heed this variable
when examining the list of supported boards.
If a word is present in `FEATURES_REQUIRED` and `FEATURES_OPTIONAL`,
then `FEATURES_OPTIONAL` takes precedence.
distclean
removes all build products, also depends on docclean
clean
removes all build products for the current board
also, silence clean target from Makefile.include and let it ignore errors
Please see #1715.
Closes#1715.
This PR implements the new Makefile variables "FEATURES_PROVIDED" and
"FEATURES_REQUIRED". A board *can* have a new file `Makefile.features`
which looks like:
```make
FEATURES_PROVIDED = transceiver
```
An application can have a corresponding line
```make
FEATURES_REQUIRED = transceiver
```
If the selected BOARD does not fulfil the requirements of the
application, then a *warning* is issued at compile time.
This change only includes the feature "transceiver", further features
are expected to be listed in further PRs. The requirement "transceiver"
is automatically added if the application uses the module
"defaulttransceiver".
`make buildtest` understands the new feature listing, so the user won't
need to add boards to `BOARD_BLACKLIST` manually.
Part of the change are the added Make targets
* `info-features-missing`, which prints the required features
`\setminus` the provided features. The output is empty if there are no
features missing.
* `info-boards-features-missing`, the same as `info-features-missing`
but as a table for all boards, but heeded `BOARD_WHITELIST` and
`BOARD_BLACKLIST`.
Applications don't have to use this new feature. This change does not
break existing Makefile.
Sometimes boards/*/Makefile.include (e. g. in case of the msba2) gets included
twice somehow, leading the TERMFLAG to be set twice and faulty. This
fixes that.
With many open PRs that could benefit from loading SDKs when needed,
instead adding vast amounts of code to RIOTs master, this PR provides
the "functions" `$(DOWNLOAD_TO_STDOUT)`, `$(DOWNLOAD_TO_FILE)`, and
`$(UNZIP_HERE)`.
The first "function" takes one argument, the URL from where to download
the content. It is then piped to stdout. To be used e.g. with `tar xz`.
The second "function" taken two arguments, the destination file name,
and the source URL. If the previous invocation was interrupted, then the
download gets continued, if possible.
The last "function" takes one argument, the source ZIP file. The file
gets extracted into the cwd, so best use this "function" with
`cd $(SOME_WHERE) &&`.
The clumsy name `$(UNZIP_HERE)` is taken because the program "unzip"
takes the environment variable `UNZIP` as the source file, even if
another file name was given on the command line. The rationale for that
is that the hackers of "unzip" hate their users. Also they sacrifice
hamsters to Satan.
This PR adds the defined `RIOT_BOARD`, `RIOT_CPU` and `RIOT_MCU`.
They each are defined as `BOARD_${BOARD}`, `CPU_${CPU}`, and
`MCU_${CPU}`, resp.
`BOARD_${BOARD}` is defined as the string `"${BOARD}"`, but not in upper
case. Same for the other two.
Building MSP boards gives an error, because `VERSION` is somewhere
defined in their toolchain as an integer.
This PR renames `VERSION` into `RIOT_VERSION`, because that's what it
is.
Almost everything was build sequentially in RIOT, because we employed
explicit for-loops to build directories (DIRS). This PR makes our make
system use normal dependencies to build directories.
All our compiling rules were duplicated, once for the application, once
for modules. This PR makes the application a normal module, removing
this duplication.