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

308 Commits

Author SHA1 Message Date
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
Gaëtan Harter
534b0da9a5
Merge pull request #9451 from cladmi/pr/make/makefile_include/define_baselibs
Makefile.include: fully define BASELIBS before using its value
2018-07-05 13:37:27 +02:00
Gaëtan Harter
90fdd09176
Makefile.include: detect if BASELIBS changed after its first use 2018-07-04 10:23:05 +02:00
Gaëtan Harter
fb27a801af
Makefile.include: process pkg/*/Makefile.include before using BASELIBS
They can define PSEUDOMODULES which is used to populate BASELIBS.
It means they must be processed before using BASELIBS immediate value.

This moved the processing of all `Makefile.include` before using `BASELIBS`.
It is also moved before setting `BASELIBS` in `modules.inc.mk to keep the
order logical (it would work anyway thanks to deferred variables evaluation).

This fixes the problems for `make -C tests/unittests`
2018-07-04 10:22:57 +02:00
Gaëtan Harter
d8a264312c
Makefile.include: process 'modules.inc.mk' before using BASELIBS
Build targets were using the immediate value of '$(BASELIBS)' before it was
actually set. bindist.inc.mk should also be processed before as it is adding
`BIN_USEMODULE` to `USEMODULE`.

This fixes use before define problems for:

 * `make -C examples/hello-world`
 * `make -C examples/bindist`
2018-07-04 10:20:49 +02:00
Gaëtan Harter
f7f2494426
Makefile.include: fix board/cpu inconsistent include order
Include order for board and cpu was

1. cpu include
2. board include
3. board common includes
4. cpu common includes

Its now changed to:

1. board include
2. board common includes
3. cpu include
4. cpu common includes

Verifications:

There are no common headers names between boards and cpus.
Except native that has a 'periph_conf.h' in cpu instead of being in board.
2018-07-04 09:20:01 +02:00
Joakim Nohlgård
b36afc3964 make: Clean up WERROR handling 2018-06-26 12:50:02 +02:00
Gaëtan Harter
acef97aa15
Merge pull request #9243 from cladmi/pr/warning/missing_include_dirs
makefiles/cflags.inc.mk: add -Wmissing-include-dirs flag
2018-06-18 13:13:54 +02:00
Gaëtan Harter
3bba0c5895
makefile.iotlab.single: add IoT-LAB testbed support for one node
Add support to do flash/reset/term on an IoT-LAB node.
It also allow running test using 'testrunner'.

Configuration variables are:

* `IOTLAB_NODE` which should be set to your node url
  * The full url including site to use from your computer `m3-1.grenoble.iot-lab.info`
  * The short url when used on the IoT-LAB frontend `m3-1`
* `IOTLAB_EXP_ID` for your experiment id for flash and reset.
  By default it tries to use your currently running experiment if you have only one
* `IOTLAB_USER`: is read from `${HOME}/.iotlabrc` as saved by `iotlab-auth`
  * It is expected to have run `iotlab-auth` beforehand.
2018-06-15 15:37:18 +02:00
Gaëtan Harter
d44e4c1f7f
Makefile.include: only use board include directory if it exists
Some boards do not have a boards/BOARD/include directory and rely on a
board/common one.
2018-06-12 14:08:13 +02:00
Gaëtan Harter
98d33a5eca
Makefile.include: use RIOTTOOLS variable 2018-05-09 18:01:44 +02:00
smlng
a83d53f2d9
make: add and export RIOTTOOLS directory
Replacing usage will come in further commits/PRs.
2018-05-03 15:56:00 +02:00
Josarn
1dd7ac0575 Makefile.include: add SIZEFLAGS 2018-04-27 12:23:06 +02:00
Gaëtan Harter
94214cdcae Makefile.include: fix missing target for libraries
Unittests add libraries in 'BASELIBS' which do not have any rules to be built as
they are built by 'application.inc.mk', packages and the DIRS variable.
So make complains about missing target for the unittests archives.

The fix tells these files are generated when building '$(APPLICATION_MODULE).a'.

The bug was introduced by #8844

Fixes #8910
2018-04-16 12:54:41 +02:00
cladmi
45dad9a9d1 Makefile.include: check FEATURES_CONFLICT against FEATURES_USED
The FEATURES_CONFLICT check should be done on used features to also
test for included optional features.
2018-04-11 17:45:41 +02:00