Add makefile param identifier in the const file
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 28 Aug 2009 15:10:45 +0000 (15:10 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 28 Aug 2009 15:10:45 +0000 (15:10 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2818 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BCpuPage.py
wizard/bertos_utils.py
wizard/const.py

index 72f28da44a47295ba815fec61bf133c22bef925d..8ebaf4125fb2a496e574901c40d2d7924b3630c7 100644 (file)
@@ -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]
index f0a1bc7fc2fad09f767cc42ba6a13dfad4f82f22..f67da76a2b2dcb0e14cdd3a25f5fc050c360b90d 100644 (file)
@@ -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)
index 4b2a3fccb10ea82f50d69482d57ce454f3ce8b37..c397b3b8efce6a48eed0ba874348a33d086bbc9b 100644 (file)
@@ -83,3 +83,5 @@ MODULE_DEFINITION = {
     "module_hw": "module_hw",
     "module_supports": "module_supports",
 }
+
+MK_PARAM_ID = "MK_"