X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos_utils.py;h=a15e5af1fd815fec0063db22016f86cbf2c6d44b;hb=727edddf2c40ac13504567b8b71bf0857eff5e5f;hp=dffa2ab843094373b291494513d751418adc4363;hpb=2d0ed91b73aafe29d183c4c525b953f169a6da51;p=bertos.git diff --git a/wizard/bertos_utils.py b/wizard/bertos_utils.py index dffa2ab8..a15e5af1 100644 --- a/wizard/bertos_utils.py +++ b/wizard/bertos_utils.py @@ -28,7 +28,6 @@ # # Copyright 2008 Develer S.r.l. (http://www.develer.com/) # -# $Id$ # # Author: Lorenzo Berni # @@ -182,7 +181,8 @@ def mkGenerator(project_info): Generates the mk file for the current project. """ makefile = open(os.path.join(const.DATA_DIR, "mktemplates/template.mk"), "r").read() - destination = os.path.join(project_info.prjdir, os.path.basename(project_info.prjdir) + ".mk") + prjdir = os.path.abspath(project_info.prjdir) + destination = os.path.join(prjdir, os.path.basename(prjdir) + ".mk") mk_data = {} mk_data["$pname"] = project_info.info("PROJECT_NAME") mk_data["$ppath"] = relpath.relpath(project_info.info("PROJECT_SRC_PATH"), project_info.info("PROJECT_PATH")) @@ -193,8 +193,8 @@ def mkGenerator(project_info): 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) - mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[0]) - mk_data["$suffix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].split("gcc")[1]) + mk_data["$prefix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].rsplit("gcc", 1)[0]) + mk_data["$suffix"] = replaceSeparators(project_info.info("TOOLCHAIN")["path"].rsplit("gcc", 1)[1]) mk_data["$hwpath"] = relpath.relpath(project_info.info("PROJECT_HW_PATH"), project_info.info("PROJECT_PATH")) for key in mk_data: makefile = makefile.replace(key, mk_data[key])