From 344b239309e4326aa23c7320647458a1edc088d2 Mon Sep 17 00:00:00 2001 From: Luca Burelli Date: Wed, 7 Feb 2024 09:27:53 +0100 Subject: [PATCH] fix(platform): use numbers in all recipe hooks The Arduino Platform Specification requires that the recipe hooks are distinguished by a number and does not endorse using text labels. Fix all the usages of recipe hooks to use numbers. Closes arduino/arduino-cli#2369 . --- platform.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/platform.txt b/platform.txt index 2e8aa777d65..dcb6a875a99 100644 --- a/platform.txt +++ b/platform.txt @@ -191,13 +191,13 @@ recipe.hooks.prebuild.6.pattern.windows=cmd /c if not exist "{build.path}\build_ # Set -DARDUINO_CORE_BUILD only on core file compilation file_opts.path={build.path}/file_opts -recipe.hooks.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > {file_opts.path}" -recipe.hooks.core.prebuild.set_core_build_flag.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > {file_opts.path}" -recipe.hooks.core.postbuild.set_core_build_flag.pattern=/usr/bin/env bash -c ": > {file_opts.path}" +recipe.hooks.prebuild.7.pattern=/usr/bin/env bash -c ": > {file_opts.path}" +recipe.hooks.core.prebuild.1.pattern=/usr/bin/env bash -c "echo -DARDUINO_CORE_BUILD > {file_opts.path}" +recipe.hooks.core.postbuild.1.pattern=/usr/bin/env bash -c ": > {file_opts.path}" -recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}" -recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}" -recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}" +recipe.hooks.prebuild.7.pattern.windows=cmd /c type nul > "{file_opts.path}" +recipe.hooks.core.prebuild.1.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}" +recipe.hooks.core.postbuild.1.pattern.windows=cmd /c type nul > "{file_opts.path}" # Generate debug.cfg (must be postbuild) recipe.hooks.postbuild.1.pattern=/usr/bin/env bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{debug.server.openocd.scripts_dir}"board/{build.openocdscript} "{build.source.path}"/debug.cfg"