1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

refactor(lv_conf_internal): simplify the uppercase conversation added in aba10b0

Reaeted to #1989
This commit is contained in:
Gabor Kiss-Vamosi 2021-01-04 09:45:50 +01:00
parent 56a48e0173
commit 3dbee9b584

View File

@ -93,14 +93,13 @@ for i in fin.read().splitlines():
if r:
line = re.sub('\(.*?\)', '', r[1], 1) #remove parentheses from macros
line_upper = line.upper();
dr = re.sub('.*# *define', '', i, 1)
d = "# define " + dr
fout.write(
f'#ifndef {line}\n'
f'# ifdef CONFIG_{line_upper}\n'
f'# define {line} CONFIG_{line_upper}\n'
f'# ifdef CONFIG_{line.upper()}\n'
f'# define {line} CONFIG_{line.upper()}\n'
f'# else\n'
f'{d}\n'
f'# endif\n'