cpu/stm32/kconfig: create family directory if not exist
This commit is contained in:
parent
afd3de2043
commit
bd24a71fe0
9
cpu/stm32/dist/kconfig/gen_kconfig.py
vendored
9
cpu/stm32/dist/kconfig/gen_kconfig.py
vendored
@ -112,9 +112,12 @@ def generate_kconfig(kconfig, context, overwrite, verbose):
|
||||
template = env.get_template(template_file)
|
||||
render = template.render(**context)
|
||||
|
||||
kconfig_file = os.path.join(
|
||||
STM32_KCONFIG_DIR, context["fam"], "Kconfig.{}".format(kconfig)
|
||||
)
|
||||
kconfig_dir = os.path.join(STM32_KCONFIG_DIR, context["fam"])
|
||||
kconfig_file = os.path.join(kconfig_dir, "Kconfig.{}".format(kconfig))
|
||||
|
||||
# Create family Kconfig dir if it doesn't exist yet
|
||||
if not os.path.exists(kconfig_dir):
|
||||
os.makedirs(kconfig_dir)
|
||||
|
||||
if (not os.path.exists(kconfig_file) or
|
||||
(os.path.exists(kconfig_file) and
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user