mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 08:26:38 +02:00
0.8.101
* updated converter scripts to include all enabled features again (redundant scan of build flags) #1534
This commit is contained in:
parent
4b75e72bf3
commit
2a4c83647a
4 changed files with 21 additions and 8 deletions
|
@ -9,19 +9,29 @@ from pathlib import Path
|
|||
import subprocess
|
||||
import configparser
|
||||
Import("env")
|
||||
build_flags = []
|
||||
|
||||
import htmlPreprocessorDefines as prepro
|
||||
|
||||
|
||||
|
||||
def get_build_flags():
|
||||
def getFlagsOfEnv(env):
|
||||
config = configparser.ConfigParser()
|
||||
config.read('platformio.ini')
|
||||
global build_flags
|
||||
build_flags = config["env:" + env['PIOENV']]['build_flags'].split('\n')
|
||||
flags = config[env]['build_flags'].split('\n')
|
||||
|
||||
for i in range(len(build_flags)):
|
||||
build_flags[i] = build_flags[i][2:]
|
||||
for i in range(len(flags)):
|
||||
if flags[i][:2] == "-D" or flags[i][:2] == "${":
|
||||
flags[i] = flags[i][2:]
|
||||
if flags[i][-13:-1] == ".build_flags":
|
||||
getFlagsOfEnv(flags[i].split(".build_flags")[0])
|
||||
elif len(flags[i]) > 0:
|
||||
build_flags = build_flags + [flags[i]]
|
||||
|
||||
|
||||
def get_build_flags():
|
||||
getFlagsOfEnv("env:" + env['PIOENV'])
|
||||
config = configparser.ConfigParser()
|
||||
config.read('platformio.ini')
|
||||
|
||||
# translate board
|
||||
board = config["env:" + env['PIOENV']]['board']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue