Commit Graph

6 Commits

Author SHA1 Message Date
Martí Bolívar 3f8d33ee3b scripts: restore utils/migrate_includes.py
Commit 9b30667c77
("build: drop LEGACY_INCLUDE_PATH support")
removed scripts/utils/migrate_includes.py.

This was premature. This script is still useful to users of older
versions of zephyr that are attempting to migrate to current ones.

For example, users of v2.7 LTS who are migrating to v3.4 should
still be able to run the script to migrate their code bases.

Restore it. Maybe after next LTS we can remove it. It costs
basically nothing to keep it in the tree.

Signed-off-by: Martí Bolívar <mbolivar@amperecomputing.com>
2023-08-10 08:05:54 +00:00
Fabio Baltieri 9b30667c77 build: drop LEGACY_INCLUDE_PATH support
LEGACY_INCLUDE_PATH has been defaulting to "n" and marked as deprecated
in both v3.2 and v3.3. Drop the option entirely for v3.4.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-02-21 15:06:48 +01:00
Jamie McCrae ec7044437e treewide: Disable automatic argparse argument shortening
Disables allowing the python argparse library from automatically
shortening command line arguments, this prevents issues whereby
a new command is added and code that wrongly uses the shortened
command of an existing argument which is the same as the new
command being added will silently change script behaviour.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-01-26 20:12:36 +09:00
Anders Bjørn Nedergaard 53227f1f13 scripts: migrate_includes: add .hpp to extension list
The script will now also migrate includes in files with the suffix `hpp`.

Signed-off-by: Anders Bjørn Nedergaard <ape.anp@gmail.com>
2022-12-15 10:29:46 +01:00
Gerard Marull-Paretas b0d4aea769 scripts: migrate_includes: migrate zephyr.h to kernel.h
The script will now automatically migrate all <zephyr.h> or
<zephyr/zephyr.h> (for already migrated projects) to <zephyr/kernel.h>.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2022-09-05 16:31:47 +02:00
Gerard Marull-Paretas 0d18e911fc scripts: utils: add include migration script
All includes are now prefixed with <zephyr/...>, even though the old
include paths can still be used when CONFIG_LEGACY_INCLUDE_PATH=y, an
option still enabled by default. Migrating large projects can be tedious
and time consuming. This patch provides a script that can be used to
migrate any Zephyr-based project to the new include path. It is used
like this:

  python $ZEPHYR_BASE/scripts/utils/migrate_includes.py \
         -p path/to/zephyr-based-project

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-05-11 10:55:35 +02:00