]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
scripts/gen_compile_commands.py: adapt _LINE_PATTERN
authorJoao Marcos Costa <jmcosta944@gmail.com>
Sun, 1 Oct 2023 10:00:30 +0000 (12:00 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 11 Oct 2023 17:24:23 +0000 (13:24 -0400)
For U-Boot's context, the regular expression defined by _LINE_PATTERN
should be adapted. Replace 'savedcmd' by 'cmd'.

Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
Tested-by: Joao Paulo Goncalves <joao.goncalves@toradex.com>
scripts/gen_compile_commands.py

index 15ba56527acd85bb608118ea145c84606a42ab78..0227522959a45c7253ed13ca1950affcb4f55522 100755 (executable)
@@ -19,7 +19,7 @@ _DEFAULT_OUTPUT = 'compile_commands.json'
 _DEFAULT_LOG_LEVEL = 'WARNING'
 
 _FILENAME_PATTERN = r'^\..*\.cmd$'
-_LINE_PATTERN = r'^savedcmd_[^ ]*\.o := (.* )([^ ]*\.c) *(;|$)'
+_LINE_PATTERN = r'^cmd_[^ ]*\.o := (.* )([^ ]*\.c) *(;|$)'
 _VALID_LOG_LEVELS = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
 # The tools/ directory adopts a different build system, and produces .cmd
 # files in a different format. Do not support it.