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

17 Commits

Author SHA1 Message Date
Leandro Lanzieri
4fbbb94bff
makefiles/kconfig: fix dependencies for out.config target
Kconfig.dep depends on FORCE, so it is always generated when compiling
with Kconfig under normal conditions. Whan TEST_KCONFIG=1 is set, this
file is no longer a dependency for out.config. So when cleaning the
'bin' directory, out.config has no direct dependencies that force its
rebuilding (the generated directory is order only). This causes the file
not to be produced when calling `TEST_KCONFIG=1 make clean all`.

This PR changes the dependency on the 'generated' directory to a direct
dependency when `CLEAN` is set and leaves it as order-only when not.
This allows to generate out.config only when needed by not depending on
FORCE.
2020-09-23 09:49:44 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:

   KCONFIG_MODULE_ => KCONFIG_USEMODULE_
   KCONFIG_PKG_ => KCONFIG_USEPKG_
   MODULE_ => USEMODULE_
   PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Leandro Lanzieri
180ee6efc9
makefiles: introduce KCONFIG_ADD_CONFIG variable
This holds a list of .config files to be merged. For more details see
kconfig.mk.
2020-08-12 12:22:42 +02:00
Leandro Lanzieri
01454188e8
Makefile.include: introduce TEST_KCONFIG switch
This switch allows to test the module dependency modelling during the
Kconfig migration. When set, it will use the symbols prefixed with
CONFIG_MOD_ defined by Kconfig as the list of modules to compile.
2020-08-12 12:22:41 +02:00
Cenk Gündoğan
132b7328e3
make: kconfig: use fixdep to enable incremental compilation 2020-08-11 09:47:32 +02:00
Leandro Lanzieri
4803793418
makefiles/kconfig: refactor targets and remove merged.config
Instead of the merged.config file, menuconfig operates directly on
out.config, which also is the destination of the merge of multiple
configuration sources.

Also, this introduces the autoconf.h.d file to track the Kconfig
dependencies and re-trigger the build of the header when any of the
Kconfig files change.
2020-08-07 18:17:38 +02:00
Leandro Lanzieri
cf779a7241
makefiles/kconfig.mk: Remove duplicate calls to merge_config 2020-08-03 12:26:05 +02:00
Leandro Lanzieri
6a5c7744cb
makefiles/kconfig.mk: include KCONFIG_OUT_CONFIG always
This allows to include KCONFIG_OUT_CONFIG file in Makefile
unconditionally, which means that `make clean all` is allowed when using
Kconfig.

For this, the recipe for `clean` is guarded with `MAKE_RESTARTS` so
the BINDIR folder is not removed once Make restarts scanning the files.
2020-07-31 13:55:33 +02:00
Cenk Gündoğan
53eb1efe1b kconfig: make sync-deps flag accessible 2020-07-29 15:33:07 +02:00
Leandro Lanzieri
4ae944bac2
makefiles/kconfig: Output out.config with generated configuration
'merged.config' may not always be present (e.g. when no files to merge
are present). In order to always have an up-to-date configuration file
'out.config' will be generated mirroring the content of 'autoconf.h'.
This is the file that the build system will include to read the current
configuration symbols.
2020-04-08 17:37:05 +02:00
Leandro Lanzieri
f716cb1d39 makefiles/kconfig: Allow to override SHOULD_RUN_KCONFIG 2020-01-30 17:42:42 +01:00
Francisco
330d9dffc6
Merge pull request #12977 from leandrolanzieri/pr/makefiles/kconfig_only_when_needed
makefiles/kconfig: Only run Kconfig if it could generate configurations
2020-01-14 11:28:34 +01:00
Leandro Lanzieri
e88254e52a makefiles/kconfig: Escape comment in autoconf.h for Windows
In Windows setups using MSYS environment variables which start with a
slash get the 'root path' added. This adds a second slash to the content
of KCONFIG_AUTOHEADER_HEADER, so the first one is escaped when building
on those platforms.
2020-01-05 20:45:14 +01:00
Leandro Lanzieri
707ad8d083 makefiles/kconfig: Include configuration symbols
If the generated configuration file is present include it. That way one
can check if certain symbols are being configured using Kconfig.
2019-12-19 15:35:21 +01:00
Leandro Lanzieri
9c8b7a064b makefiles/kconfig: Only run Kconfig if could generate configurations
This adds a check to decide if Kconfig should run on a build. It will
run if any of the following conditions is true:
- A file with '.config' extension is present in the application folder
- A 'Kconfig' file is present in the application folder
- A previous configuration file is present (e.g. from a previous call to
  menuconfig)
- menuconfig is being called

This assumes that Kconfig will not generate any default configurations
just from the Kconfig files outside the application folder (i.e. module
configuration via Kconfig is disabled by default). Should this change,
the check would not longer be valid, and Kconfig would have to run on
every build.
2019-12-18 09:46:43 +01:00
Leandro Lanzieri
b674710ae5 makefiles/kconfig: Add symbols for used packages 2019-12-13 15:21:16 +01:00
Leandro Lanzieri
1655001d85 makefiles: Add Kconfig related targets and dependencies
- The autoconf.h header file, generated with the current Kconfig
  configurations, is added as a build dependency.

- autoconf.h depends on the proper tool (genconfig) and a Kconfig.dep
  which contains the dependencies for the given application and board,
  this is generated from $(USEMODULE).

- The menuconfig target is added, to allow the configuration of modules
  using the Kconfig system.
2019-12-04 15:23:51 +01:00