Move name of config file to one location

pull/1975/head
Jimmy Brisson 2016-06-23 12:40:50 -05:00
parent 3a273f78f2
commit f92d3ec9be
2 changed files with 4 additions and 2 deletions

View File

@ -174,7 +174,7 @@ class Exporter(object):
if hasattr(self, "MBED_CONF_ACTIVE") and self.MBED_CONF_ACTIVE :
# Add the configuration file to the target directory
self.config_header = "mbed_conf.h"
self.config_header = self.toolchain.MBED_CONFIG_FILE_NAME
config.get_config_data_header(join(trg_path, self.config_header))
self.config_macros = []
else :

View File

@ -227,6 +227,8 @@ class mbedToolchain:
GOANNA_FORMAT = "[Goanna] warning [%FILENAME%:%LINENO%] - [%CHECKNAME%(%SEVERITY%)] %MESSAGE%"
GOANNA_DIAGNOSTIC_PATTERN = re.compile(r'"\[Goanna\] (?P<severity>warning) \[(?P<file>[^:]+):(?P<line>\d+)\] \- (?P<message>.*)"')
MBED_CONFIG_FILE_NAME="mbed_config.h"
def __init__(self, target, options=None, notify=None, macros=None, silent=False, extra_verbose=False):
self.target = target
self.name = self.__class__.__name__
@ -908,7 +910,7 @@ class mbedToolchain:
def get_config_header(self):
if self.config_data is None:
return None
config_file = join(self.build_dir, "mbed_config.h")
config_file = join(self.build_dir, self.MBED_CONFIG_FILE_NAME)
if not exists(config_file):
with open(config_file, "wt") as f:
f.write(Config.config_to_header(self.config_data))