# Copyright 2008 Develer S.r.l. (http://www.develer.com/)
# All rights reserved.
#
-# $Id:$
+# $Id$
#
# Author: Lorenzo Berni <duplo@develer.com>
#
import glob
import re
import shutil
+# Use custom copytree function
+import copytree
import pickle
import const
# Destination source dir
srcdir = directory + "/bertos"
shutil.rmtree(srcdir, True)
- shutil.copytree(sources_dir + "/bertos", srcdir)
+ copytree.copytree(sources_dir + "/bertos", srcdir, ignore_list=const.IGNORE_LIST)
# Destination makefile
makefile = directory + "/Makefile"
if os.path.exists(makefile):
cfgdir = prjdir + "/cfg"
shutil.rmtree(cfgdir, True)
os.mkdir(cfgdir)
+ # Set to 1 the autoenabled for enabled modules
+ for module, information in project_info.info("MODULES").items():
+ if information["enabled"] and "configuration" in information and information["configuration"] != "":
+ configurations = project_info.info("CONFIGURATIONS")
+ configuration = configurations[information["configuration"]]
+ for start, parameter in configuration["paramlist"]:
+ if "type" in configuration[parameter] and configuration[parameter]["type"] == "autoenabled":
+ configuration[parameter]["value"] = "1"
+ project_info.setInfo("CONFIGURATIONS", configurations)
+ # Copy all the configuration files
for configuration, information in project_info.info("CONFIGURATIONS").items():
string = open(sources_dir + "/" + configuration, "r").read()
for start, parameter in information["paramlist"]:
infos = information[parameter]
value = infos["value"]
- if "type" in infos["informations"] and infos["informations"]["type"] == "autoenabled":
- value = "1"
if "unsigned" in infos["informations"].keys() and infos["informations"]["unsigned"]:
value += "U"
if "long" in infos["informations"].keys() and infos["informations"]["long"]:
mk_data["$pname"] = os.path.basename(project_info.info("PROJECT_PATH"))
mk_data["$cpuflag"] = project_info.info("CPU_INFOS")["CPU_FLAG_NAME"]
mk_data["$cpuname"] = project_info.info("CPU_INFOS")["CORE_CPU"]
+ mk_data["$cpuclockfreq"] = project_info.info("SELECTED_FREQ")
mk_data["$cflags"] = " ".join(project_info.info("CPU_INFOS")["C_FLAGS"])
mk_data["$ldflags"] = " ".join(project_info.info("CPU_INFOS")["LD_FLAGS"])
mk_data["$cppflags"] = " ".join(project_info.info("CPU_INFOS")["CPP_FLAGS"])