Fix #160.
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 23 Sep 2010 10:54:29 +0000 (10:54 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Thu, 23 Sep 2010 10:54:29 +0000 (10:54 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4271 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/BProject.py
wizard/bertos_utils.py

index 46d914fac201cf0325b7d85e690d0be2d7dc88b0..1a7fb258d2e4289f97a8d0b68307edd30d152e80 100644 (file)
@@ -383,8 +383,11 @@ class BProject(object):
             self._mergeSources(self.bertos_maindir, self.srcdir, self.old_srcdir)
             # Copy all the hw files
             self._writeHwFiles(self.bertos_srcdir, self.hwdir)
-            # Destination wizard mk file
-            self._writeWizardMkFile()
+
+        # Destination wizard mk file (it seems that this file need to be
+        # rewritten also if the project is a preset)...
+        self._writeWizardMkFile()
+
         # Set properly the autoenabled parameters
         self._setupAutoenabledParameters()
         # Copy all the configuration files
index 148af10e3fccc700b2c916e003a99c8b4030fafa..a15e5af1fd815fec0063db22016f86cbf2c6d44b 100644 (file)
@@ -181,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"))