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

322 Commits

Author SHA1 Message Date
Gaëtan Harter
434328debf
Makefile.include: append the values to GLOBAL_GOALS
This allows setting other GLOBAL_GOALS by setting it before.
This could be the case for the application `Makefile` or files parsed
from `RIOT_MAKEFILES_GLOBAL_PRE`.
2019-01-18 16:40:16 +01:00
bb97c05b36
Merge pull request #10543 from jcarrano/no-building-with-different-version
Makefile.include: remove functionality to build with another version.
2019-01-17 15:55:07 +01:00
Gaëtan Harter
61452669b9
Merge pull request #10038 from smlng/pr/make/buildoutdir
make: introduce common BUILD_DIR
2019-01-16 14:18:48 +01:00
5aa3a2b4b7 make: handle disabled default modules before dependencies 2019-01-10 11:59:28 +01:00
smlng
5b3d26453a make: introduce BUILDOUT_DIR
This introduces a new environment variable for a common directory
that holds all output of the build process, such as application or
package binaries. This would also allow to easily redirect output
to any other location, e.g. for out-of-source builds.
2019-01-07 21:16:36 +01:00
Francisco Acosta
281d8084bf riotboot: add riot-based minimal bootloader
riotboot is introduced here and makes use of riotboot_hdr,
which indentifies the images encapsulated as slots.
The slot size and offset is configurable, which makes
slots extendable if needed, e.g. 2 or more slots can be
transparently added.

Co-authored-by: Kaspar Schleiser <kaspar@schleiser.de>
Co-authored-by: Gaëtan Harter <gaetan.harter@fu-berlin.de>
2018-12-18 19:31:35 +01:00
Gaëtan Harter
321dc5292f
Merge pull request #10548 from jcarrano/flash-canned-recipe
Makefile.include: flash: do not peek into MAKECMDGOALS.
2018-12-18 14:09:55 +01:00
Juan Carrano
ae524e917f Makefile.include: flash: do not peek into MAKECMDGOALS.
When flash-only was introduced (in #8373), the `flash` rule was
made conditionally dependent on `all` by looking for `flash-only`
in MAKECMDGOALS. This was done to avoid code duplication.

There's a cleaner way, by using canned recipes. When we upgrade the
requirements to gnu make 4, the flash recipe can be defined as ?=.
2018-12-18 13:15:50 +01:00
Juan Carrano
8945a9513e Makefile.include: remove rule to remake PKGs' Makefile.include
This rule is not being used, it complicates the makefile and causes
make clean to permform unnecessary actions.

All packages have a Makefile.include, so the rule is not needed anyways.
Also, it is defined with a double colon for no reason.
2018-12-07 17:49:22 +01:00
Kevin "Bear Puncher" Weiss
35626eda50
Merge pull request #10270 from cladmi/pr/make/pre_post_include
Makefile.include: allow specifying makefiles to be parsed
2018-12-07 17:42:21 +01:00
Gaëtan Harter
efddd4aef9
Makefile.include: allow specifying makefiles to be parsed
This allows specifying a list of files that should be parsed by make at
the beginning and at the end of Makefile.include.

It is a generic mechanism to allow specifying system wide configuration:

* Globally overwrite the 'TERMPROG'
* Specify a hard written port / debug_adapter_id for some BOARD values
* Define you own specific targets
* Override default targets

It can include file before and after Makefile.include to allow handling
different configurations.
2018-12-06 14:49:34 +01:00
Gaëtan Harter
135d2f7fba
Makefile.include: building in docker should be done after clean
When building in parallel, clean is done at the same time as the
container starts building.

So the parallel `clean all` handling should also be done for the
`..in-docker-container` target.
2018-12-06 12:34:22 +01:00
Juan Carrano
e666c3864c eclipse.inc.mk: Split eclipse support into it's own file.
To keep Makefile.include clean and to be consistent with other tools,
the Eclipse IDE support is put in a separate file.
2018-12-05 15:22:42 +01:00
Juan Carrano
4589c3b8d3 Makefile.include: remove functionality to build with another version.
Makefile.include contained logic to clone a different RIOT version and
build the application against it. This can be easily achieved by making
a git worktree and overriding RIOTBASE, without adding any complexity
to our makefiles. Therefore, the feature is being removed.
2018-12-04 16:18:07 +01:00
Gaëtan Harter
2fc5ad6bae
Merge pull request #10302 from cladmi/pr/make/docker/fix_riotproject_is_appdir
Makefile.include: Fix BUILDRELPATH when RIOTPROJECT is CURDIR.
2018-11-01 09:46:33 +01:00
Gaëtan Harter
a5b2af1baf
Makefile.include: Fix BUILDRELPATH when RIOTPROJECT is CURDIR.
This fixes building an example that is outside of RIOT with docker and
also fixes building from a release archive.
2018-10-30 17:16:07 +01:00
Gaëtan Harter
f82ace910f
Makefile.include: Fix default RIOTBASE when there is Makefile.local
When an application only includes Makefile.include without specifying
RIOTBASE and uses a `Makefile.local` file, RIOTBASE would use a wrong
default value and get the value of the directory where `Makefile.local` is.
2018-10-30 17:08:57 +01:00
smlng
7d1bf26128 build: remove hostname from RIOT_VERSION string
The hostname does not provide any additional or necessary information to
the RIOT_VERSION string. On the contrary, some might consider the hostname
as personal information, which should not be exposed unsolicitedly.
2018-10-29 09:02:47 +01:00
Gaëtan Harter
357a4a0db9
makefiles: make the build system aware of GIT_CACHE_DIR
Currently the default value was set by `dist/tools/git/git-cache`.
This moves/duplicates the default value in the build system.
2018-10-23 15:00:47 +02:00
Gaëtan Harter
6b534a935f
make: process include and dep for external modules
Process `Makefile.include` for external modules. It is included after the others
so it could overwrite some of the configuration if wanted.

Process `Makefile.dep` for external modules. It is included before the others so
it could be parsed before setting 'default' values to dependencies.
2018-10-23 13:22:25 +02:00
cladmi
d809d82b91
Makefile.include: sanity check that cpu Makefile.features is used
This prepares for being able to always include Makefile.features
globally. It prevents new board for missing this until it is done.
2018-10-11 17:12:47 +02:00
cladmi
4652cb2b28
Makefile.include: Replace pkg archive file targets by phony targets
It fixes issues with the current rule that it is wrong that each
`$(BINDIR)/pkgname.a` is built by going in the package directory:

* `nordic_softdevice_ble.a` is built using `DIRS` and so the
  `$(APPLICATION_MODULE).a` target.
* It prevents having packages that are pseudomodules, which may be
  required to only use one "library" part of a package.

It also simplifies handling changes in 'ld -r' PR that could produce
objects instead of archives for packages.

Limitation of the current implementation
----------------------------------------

It removes rules being 'file' target and makes them depend on `.PHONY`
targets so always forces re-build.
But having a file target whose file is silently generated by another
target does not trigger a rebuild in Make.

They may have been declared as `order-only` prerequisites but as there are
some edge-cases that may not always work and does not currently add anything,
it was decided to keep them as normal prerequisites until it can be
globally solved.
2018-09-20 15:47:42 +02:00
cladmi
8a6771ac50
Makefile.include: do not create BINDIR for usepkg build
BINDIR has already have been created by `pkg-prepare` and the real build
directory for the package will be created by the make target itself.
2018-09-20 14:20:54 +02:00
cladmi
e082ee6766
Makefile.include: add a target name in usepkg build target
Explicit the target name so the stem can be extracted.
2018-09-20 14:20:29 +02:00
cladmi
5f3d0eab4d
Makefile.include: also detect features and blacklist on flash
Now also print warnings if there are missing features or a blacklisted
board when doing 'make flash'

Before, only when doing 'make' or 'make all' the FEATURES_REQUIRED,
BOARD_BLACKLIST/WHITELIST and TOOLCHAINS were checked and a warning was printed.

However as 'flash' triggers 'all' it is a common case to do 'make flash'
directly instead of 'make all flash'. So better also print warnings in
this case.
2018-09-18 16:19:03 +02:00
cladmi
19e1731993
Makefile.include: always include board Makefile.features
makefiles/info-global.inc.mk already includes this file unconditionally.
So it is misleading to say it is optional.
2018-09-10 18:33:45 +02:00
adb25fb075 make: add global test target 2018-09-07 15:13:08 +02:00
Gaëtan Harter
cc63d2d21c
genconfigheader: use lazysponge for file management
Remove file management from `genconfigheader` script and use `lazysponge` in
Makefile.include.

Use --verbose option when in non QUIET building mode.
2018-08-20 11:34:55 +02:00
Gaëtan Harter
94f2a499a3
make: add LAZYSPONGE and LAZYSPONGE_FLAGS variables 2018-08-20 11:34:52 +02:00
Gaëtan Harter
623e3e156d
Merge pull request #9730 from miri64/make/enh/toolchain-supported-list
make: provide support for listing supported and blacklisting toolchains
2018-08-16 17:11:26 +02:00
Martine Lenders
814a7c3a21 Makefile.include: add output for unsupported toolchains
Assuming `TOOLCHAIN_SUPPORTED` is provided by the board and
`TOOLCHAIN_BLACKLIST` by a module or `pkg`, this outputs the fact that
a toolchain is not supported or blacklisted in a similar manner as
(un-)supported features and boards are.
2018-08-16 16:41:58 +02:00
Joakim Nohlgård
dda55731ff Makefile.include: Remove -Wno-implicit-fallthrough 2018-08-14 10:20:37 +02:00
Joakim Nohlgård
9e5dd332cf Makefile.include: Set CCACHE_CPP2 to fix false warnings 2018-08-14 10:20:14 +02:00
Gaëtan Harter
67e3b3a8dd
Merge pull request #9761 from cladmi/pr/release/version
Makefile.include: Include VERSION file for release
2018-08-10 16:49:17 +02:00
Gaëtan Harter
5c9213dfc6
Makefile.include: Include VERSION file for release
When downloading the release archive and building an example, the RIOT_VERSION string is not set to "Version 2018.04" but to
    
    Version: UNKNOWN (builddir: /home/me/Downloads/RIOT-2018.04)

This allows sourcing a global VERSION file to manually set it before releases.
2018-08-10 16:15:56 +02:00
smlng
68a6ba8987 make: introduce common Python lib path
Introduce dist/pythonlibs directory to store RIOT python packages.
This directory is exported via PYTHONPATH by the build system to
make it commonly available.
2018-08-10 11:37:43 +02:00
Juan Carrano
2ba8683315 Makefile.include: Make config header FORCE instead of PHONY. 2018-07-25 12:35:06 +02:00
Juan Carrano
c60a06b058 Makefile.include: Make eclipsesym.xml FORCE (not PHONY). 2018-07-25 12:35:06 +02:00
Juan Carrano
b86a326de6 Makefile.include: Make archives FORCE instead of PHONY. 2018-07-25 12:35:06 +02:00
Juan Carrano
8667758cb0 Makefile.include: make pkgs Makefile.include FORCE instead of PHONY
The rule to rebuild the Makefile.include(s) should be removed at some
point.
2018-07-25 12:35:06 +02:00
Juan Carrano
5ce0720bcf Makefile.include: Explain usage of FORCE and PHONY. 2018-07-25 12:35:06 +02:00
Martine Lenders
ff46796002 make: make BUILDRELPATH dependent on selected path
When selecting a directory to build using `-C` with make
`BUILD_IN_DOCKER` will fail, because the `BUILDRELPATH` chooses the path
`make` is executed in, not the path selected by `-C`. This fixes this
bug by replacing `PWD` in the macro's definition with `CURDIR`.
2018-07-16 15:15:04 +02:00
Gaëtan Harter
82c8d69f34
Makefile.include: remove debug '$(info)'
Remove debug '$(info)' added by https://github.com/RIOT-OS/RIOT/pull/9451
2018-07-10 18:37:06 +02:00
Gaëtan Harter
17545e4389
Merge pull request #9002 from cladmi/pr/makefiles/builddeps
make: Add 'BUILDDEPS' variable
2018-07-10 18:22:32 +02:00
smlng
98c02b8045 make: fix dedup USEMODULE_INCLUDES in Makefile.include
Fixes a regression introduces #9479 which breaks building on macOS.
    The introduces `uniq` function is never called, hence the includes
    ie. USEMODULE_INCLUDES are not used.
2018-07-10 15:41:33 +02:00
Cenk Gündoğan
202e73dcdf make: dedup USEMODULE_INCLUDES w/o shelling out
Currently, `USEMODULE_INCLUDES` is deduplicated using a combination of
`tr` and `awk`. The proposed method achieves a deduplication (no
sorting) without the need to shell out by using make internals only.
2018-07-09 15:06:38 +02:00
Gaëtan Harter
61f13baf14
Makefile.include: set pkg-prepare as BUILDDEPS
Use BUILDDEPS to define pkg-prepare dependency
2018-07-06 18:56:46 +02:00
Gaëtan Harter
2f41244adc
Makefile.include: set APPDEPS as BUILDDEPS
Use BUILDDEPS to define the APPDEPS dependency
2018-07-06 18:56:43 +02:00
Gaëtan Harter
ba83f1c9c6
Makefile.include: set RIOTBUILD_CONFIG_HEADER_C as BUILDDEPS
Use BUILDDEPS to define the RIOTBUILD_CONFIG_HEADER_C dependency
2018-07-06 18:56:39 +02:00
Gaëtan Harter
fb10a181a0
make: Add 'BUILDDEPS' variable
BUILDDEPS are files / make targets that should be build before compiling.
It can include packages source download, generating headers, modules.

It is the equivalent of `APPDEPS` but not limited to the application.
It cannot be done right now with `APPDEPS` as it is used in `BASELIBS` and
fixing it requires changing mips using it for source files.
2018-07-06 18:56:33 +02:00