1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

377 Commits

Author SHA1 Message Date
Gaëtan Harter
4fe875c92f
Makefile.include/term: define 'flash/flash-only' as TERMFLASHDEPS
This puts the handling of `flash/flash-only` in common for both
`term/cleanterm` commands.
2019-10-10 11:55:43 +02:00
Gaëtan Harter
2c3c275694
Makefile.include: also do 'cleanterm' after 'flash-only'
Harmonize with `term`.
2019-10-10 11:52:20 +02:00
Francisco
1c5c027ee7
Merge pull request #12004 from cladmi/pr/make/dependencies/debug_targets
make: add targets to debug dependencies variables
2019-10-08 17:41:34 +02:00
Gaëtan Harter
58cf46c706
make: add targets to debug dependencies variables
Add a 'dependency-debug' and a 'DEPENDENCY_DEBUG=1' option for
'info-boards-supported' to save some variables used when resolving
dependencies.

Print some some 'sorted' variables to simplify comparing the actual value
when the parsing order changed.

This should help tracking changes introduced when refactoring the
dependency parsing.
2019-10-07 14:45:40 +02:00
5b265088fe
Makefile.include: use external setsid with debug target
Only when setsid is not provided by the system which is typically the case on MacOSX
2019-10-03 12:43:49 +02:00
Gaëtan Harter
baad72c44a
Makefile.include: allow sending newline with cleanterm
Disable repeating the command on empty line to allow sending empty
lines.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
d27a43f89a
Makefile.include: add cleanterm target
It is similar to 'term' but with removing possible additional behaviors
from pyterm.

It currently removes the logging prefix.
2019-10-01 14:13:02 +02:00
Gaëtan Harter
3bfe30ae57
Makefile.include: only keep macros in riotbuild.h
Rely on creating an intermediate riotbuild.h.in file that is updated on
CFLAGS changes, but then generate 'riotbuild.h' without the comments.
The updated timestamp will still trigger a rebuild but not cause ccache
miss due to the content of the CFLAGS that contains absolute path.

This removes the caching issue due to the absolute path that was
added to `CFLAGS` and so the comment in that file.
2019-10-01 11:26:02 +02:00
Francisco
c215deb952
Merge pull request #12317 from aabadie/pr/make/iotlab_node_flash
Makefile.include: set default PROGRAMMER value when flashing on IoT-LAB
2019-10-01 09:46:55 +02:00
Gaëtan Harter
fbac80d357
Makefile.include: convert board/cpu macros with utils function
Convert *DEF variables to uppercase using the 'makefiles/utils' functions.
2019-09-30 17:25:24 +02:00
06123ef85b
Makefile.include: set default PROGRAMMER value when flahsing on IoT-LAB
This will avoid to load edbg logic and especially adds it to the list of FLASHDEPS: it won't be unnecessarily built when flashing a samr21-xpro/arduino-zero board on IoT-LAB
2019-09-30 16:16:43 +02:00
fe6d892969
Merge pull request #12302 from fjmolinas/pr_build_files
Makefile.include: add BUILD_FILES variable that holds all files to be built
2019-09-30 14:26:24 +02:00
Francisco Molina
ded2ebc8e7 Makefile.include: add BUILD_FILES
- Add BULD_FILES that holds all files that need to be built
  and linked.
2019-09-30 13:00:25 +02:00
68aae9c848
Merge pull request #12262 from cladmi/pr/cflags/fix_spaces_and_rebuild
makefiles: do not remove defines from CFLAGS
2019-09-28 09:42:56 +02:00
Gaëtan Harter
41d10cf005
makefiles: do not remove defines from CFLAGS
Do not remove the '-D' and '-U' values from CFLAGS.
This prevents issues where a '-D' could contain a space.

Some values way be duplicated from the 'riotbuild.h' header and the
command line but with the same value so without conflict.

To not put too many things in the command line, the -DMODULE_NAME are
only put in CFLAGS_WITH_MACROS.

Also, as now, the deferred value of CFLAGS is used for 'riotbuild.h',
macros set after the inclusion of `Makefile.include` will be taken into
account.
2019-09-27 19:29:06 +02:00
Francisco Molina
ab12e292af Makefile.include: add flash-only as pre-requisite of term 2019-09-26 10:06:28 +02:00
Sebastian Meiling
7bbdb74981
Merge pull request #10554 from jcarrano/make-minimum-version
Makefile.include: require make version 4.
2019-09-23 23:13:50 +02:00
Juan Carrano
9289fee618 Makefile.include: require make version 4.
Old versions of GNU Make (especially on OSX) are a pain to deal
with. This commit introduces a warning when such an old version
is found. The goal is the future the warning will be turned into
an error.

2020.01 is set as the date we remove support.

Complying with version 4.x is easy on OSX by using homebrew, and
on Linux, even Debian stable has the required version.
2019-09-23 18:54:19 +02:00
Gaëtan Harter
a019faaedd
Makefile.include: use an os independant 'relpath'
This should now work on 'osx'.
2019-09-16 15:52:36 +02:00
Juan Carrano
d9132eec90 Makefile.include: add rule to verify thin archives.
This adds a new target "archive-check".

Thin archives should be created with relative paths so that archives created
in a build container are useful in the host. This check ensures there are no
absolute paths inside thin archives.
2019-09-10 11:21:42 +02:00
Gaëtan Harter
765f3e9327
makefiles/utils: functions for lowercase and uppercase
Add make only function to convert strings to lowercase and uppercase.
This can replace the `$(shell echo $(var) | tr 'a-z-' 'A-Z_')` pattern.
Using the 'make' implementation results in being around 100 times faster.
2019-08-29 13:59:31 +02:00
Juan I Carrano
a4a1dc4dfe
Merge pull request #11771 from cladmi/pr/make/remove_riot_version_override
Makefile.include: remove RIOT_VERSION_OVERRIDE
2019-08-20 16:54:24 +02:00
Gaëtan Harter
ce8d10c945
makefiles: end of 'FLASHFILE' transition phase
* Remove the transition documentation.
* assert that FLASHFILE is now defined
2019-08-19 16:30:10 +02:00
Gaëtan Harter
4ebf3dcb7c
makefiles: update FLASHFILE possible values
Update the documentation to say it can also be 'ELFFILE'
The first version was setting it to EFLFILE by default but the default
behavior was removed to prevent hiding errors.

It can also be overwritten for application specific needs, like when
using 'riotboot'.
2019-08-19 16:30:10 +02:00
Gaëtan Harter
a048001e96
makefiles/buildtest: add a buildtest-indocker
Add a 'buildtest-indocker' that forces executing 'buildtest' for loop
completely inside the container.
It prevents starting one container per compilation wich is slower but
it could hide errors where the host toolchain would be used

It is currently equivalent to `buildtest` but will change when the
`buidtest` handling will be move outside of `BUILD_IN_DOCKER`.

Display an error when executed without BUILD_IN_DOCKER=1.
2019-08-14 17:02:35 +02:00
Gaëtan Harter
e04850b27b
Makefile.include: remove RIOT_VERSION_OVERRIDE
RIOT_VERSION is not used for building a specific RIOT version anymore
since #10543. The variable can now be used directly.
Add deprecation warning.
2019-08-12 16:28:19 +02:00
Gaëtan Harter
8859e1e1d9
Makefile.include: Only evaluate RIOT_VERSION when needed
This changes CFLAGS_WITH_MACROS to be:

* a deferred variable
* not exported so only evaluated when actually used

The value is only used by `Makefile.include` and `makefiles/eclipse.inc.mk`
so not required to export it.
2019-07-22 12:03:05 +02:00
Gaëtan Harter
cfd4677315
Makefile.include: use GIT_VERSION for RIOT_VERSION
Use 'GIT_VERSION' for 'RIOT_VERSION'.

This prevents evaluating 'git describe' and 'git rev-parse' when their
value is not used.
2019-07-22 12:01:18 +02:00
Gaëtan Harter
37e72e13ca
Makefile.include: do not build HEXFILE by default anymore
All boards must now use FLASHFILE
2019-07-15 19:15:58 +02:00
Francisco
827d2d9333
Merge pull request #11697 from kaspar030/pr/murdock_allow_multiple_files_for_test_job
murdock: allow multiple files to be sent along with a test job
2019-07-14 14:54:00 +02:00
a214ba493d murdock: allow multiple files to be sent along with a test job
Previously, this was hard-coded to allow one file, hard-coded to be
called "flash file".
This commit allows multiple files to be specified via adding them to the
TEST_EXTRA_FILES variable. All files will be stored in the worker's
application bin directory.

Also, the existence check has been removed, as dwqc bails out on missing
file anyways.
2019-07-13 11:57:53 +02:00
4e051f8592 make: make use CLEAN in Makefile.include 2019-07-12 15:22:48 +02:00
cb8e335c29 make: introduce $(CLEAN)
Currently, some targets are serialized before "clean" by conditionally
adding a dependency.

Make does allow ordering using "|" syntax in prerequisites, but for
"clean" that would always trigger the clean target.
By only conditionally setting $(CLEAN) to clean, that can be
circumvented.

The new CLEAN allows any recipe to be run after "clean" by specifying "|
$(CLEAN)" as prerequisite.
2019-07-12 15:22:48 +02:00
Gaëtan Harter
c9666b5d23
Merge pull request #11762 from kaspar030/add_termdeps_target
make: add termdeps target
2019-07-04 11:57:34 +02:00
6d22f942f7 make: introduce "termdeps" target 2019-07-01 19:58:54 +02:00
Gaëtan Harter
376b09b875
Makefile.features: include CPU/Makefile.features when CPU is defined
Prepare for when boards define `CPU` in `BOARD/Makefile.features`.

Include '$(RIOTCPU)/$(CPU)/Makefile.features' directly when it is
defined. This will allow removing the file inclusion from the
`BOARD/Makefile.features`. The board must then not include it directly.

Transitional change to allow migrating part by parts.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
2019-07-01 17:23:14 +02:00
Juan I Carrano
50ea0d822c
Merge pull request #11664 from cladmi/pr/make/variables_lazy_evaluation
makefiles/utils/variables: add functions to help managing variables
2019-06-28 17:11:29 +02:00
Gaëtan Harter
25a1bc48bb
makefiles/utils: include in Makefile.include
Import utils functions in Makefile.include to allow using them.
2019-06-28 11:34:43 +02:00
Francisco
ff317f2221
Merge pull request #11492 from cladmi/pr/features/declarative
Makefile.features: add declarative FEATURES_ variables definition
2019-06-14 18:03:24 +02:00
Gaëtan Harter
6130918ca8
Makefile.include: use the variables from makefiles/boards.inc.mk
BOARDS is defined, so the `find` line in `makefiles/info-global` is not
needed anymore.
2019-06-07 16:32:04 +02:00
166ed18939
make: add LOG_LEVEL to overridable variables 2019-05-28 22:49:04 +02:00
Gaëtan Harter
6d7a70b16b
Makefile.features: declare FEATURES_CONFLICTING and make use of it
Define a variable for used features that conflict and use it in
`Makefie.include`.

It was not used by `info-global.inc.mk` and is still currently not.
2019-05-28 19:21:53 +02:00
Gaëtan Harter
e1c60ead36
Makefile.features: declare FEATURES_MISSING and make use of it
Put the definition of `FEATURES_MISSING` in common and use the variable
instead of duplicating code.
2019-05-28 19:21:53 +02:00
Gaëtan Harter
700b5fb835
makefiles: Update FEATURES_OPTIONAL meaning
Update the FEATURES_OPTIONAL meaning to be more in line since
FEATURES_USED is defined. Handle FEATURES_OPTIONAL as a configuration from
the BSP/build that should not be changed anymore after.

`FEATURES_OPTIONAL` are by definition optional so are not supposed to
cause a build to fail.
Only the 'REQUIRED' ones that are not 'PROVIDED' are 'MISSING'.

* Do not change FEATURES_OPTIONAL to remove REQUIRED features
  * Prepare for having a different variable for the previous value
* Update dependency resolution/info-build as FEATURES_OPTIONAL cannot be missing
2019-05-28 19:21:53 +02:00
Gaëtan Harter
545a5f74aa
Merge pull request #11433 from cladmi/pr/make/flash_recipe/allow_overriding
Makefile.include: allow overwriting flash-recipe
2019-05-28 14:45:47 +02:00
Gaëtan Harter
13de591a95
Makefile.include: allow overwriting flash-recipe
This allows changing the flashing commands from the outside or in a BSP.
2019-05-13 19:42:07 +02:00
Gaëtan Harter
7d326e663b
Makefile.features: add a common file for the features parsing
This will allow sharing it between Makefile.include and
makefiles/info-global.inc.mk.

Also some common variables definition can also be moved to here.

Part of moving CPU/CPU_MODEL definition to Makefile.features to have it
available before Makefile.include.
2019-05-02 17:45:51 +02:00
Martine Lenders
0eba62e5b0 make: don't execute tilde files on test target
My system (Ubuntu 16.04) creates a backup when opening a file with
`vim`. This backup is called `filename~`. Due to it being a copy of the
file before opening, it also is executable, which is why it is selected
for execution with the `make test` target.

This change makes the `TESTS` macro exclude files ending in `~`. This
way files ending in `~` are not executed with `make test`.

Since e.g. projects like NextCloud are excluding such files also from
their sync [[1]], I think this is fine.

[1]: d7b881feb6/sync-exclude.lst (L3)
2019-04-17 19:48:35 +02:00
6e5c56608f make: add test-input-hash target 2019-04-04 13:37:36 +02:00
Gaëtan Harter
ec4d83727a
Makefile.include: add a 'test/available' target
This allows querying the build system if there are test available.

Before, one should rely on 'info-debug-variable-TESTS' to print the list
of test files. But was not reliable as sometime the build system printed
messages anyway.

    BOARD=esp32-wroom-32 make --silent --no-print-directory \
        -C examples/hello-world/ info-debug-variable-TESTS
    ESP32_SDK_DIR should be defined as /path/to/esp-idf directory
    ESP32_SDK_DIR is set by default to /opt/esp/esp-idf
    # empty line here

Now the return code can be trusted.
2019-03-25 16:17:26 +01:00