From: duplo Date: Fri, 28 Aug 2009 15:10:45 +0000 (+0000) Subject: Add makefile param identifier in the const file X-Git-Tag: 2.2.0~150 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=d2e1b5bfdb8f4f33e27bb7fa5ccd6408ba033436;p=bertos.git Add makefile param identifier in the const file git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2818 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 72f28da4..8ebaf412 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -66,7 +66,7 @@ class BCpuPage(BWizardPage): infos[key] = qvariant_converter.getStringList(value) if type(CPU_DEF[key]) == str or type(CPU_DEF) == unicode: infos[key] = qvariant_converter.getString(value) - elif key.startswith("MK_"): + elif key.startswith(MK_PARAM_ID): infos[key] = qvariant_converter.getString(value) else: del infos[key] diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index f0a1bc7f..f67da76a 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -218,7 +218,7 @@ def mkGenerator(project_info, makefile): mk_data["$cpuclockfreq"] = project_info.info("SELECTED_FREQ") cpu_mk_parameters = [] for key, value in project_info.info("CPU_INFOS").items(): - if key.startswith("MK_"): + if key.startswith(const.MK_PARAM_ID): cpu_mk_parameters.append("%s = %s" %(key.replace("MK", mk_data["$pname"]), value)) mk_data["$cpuparameters"] = "\n".join(cpu_mk_parameters) mk_data["$csrc"], mk_data["$pcsrc"], mk_data["$cppasrc"], mk_data["$cxxsrc"], mk_data["$asrc"], mk_data["$constants"] = csrcGenerator(project_info) diff --git a/wizard/const.py b/wizard/const.py index 4b2a3fcc..c397b3b8 100644 --- a/wizard/const.py +++ b/wizard/const.py @@ -83,3 +83,5 @@ MODULE_DEFINITION = { "module_hw": "module_hw", "module_supports": "module_supports", } + +MK_PARAM_ID = "MK_"