diff -r c7c26511138f -r 7c4a911dc066 buildframework/helium/tools/compile/compile.antlib.xml --- a/buildframework/helium/tools/compile/compile.antlib.xml Wed Jun 16 16:51:40 2010 +0300 +++ b/buildframework/helium/tools/compile/compile.antlib.xml Fri Aug 13 14:59:05 2010 +0300 @@ -46,9 +46,13 @@ - - - + + + + + + + @@ -71,20 +75,9 @@ - - - - - - - - - + Errors after compile-main: ${build.errors.total} @@ -243,75 +236,82 @@ - self.setTaskName("emake"); - // check attributes - if (attributes.get("name") == null) - throw new org.apache.tools.ant.BuildException("name attribute is not defined"); - self.log("Name: " + attributes.get("name")); - if (attributes.get("makefile") == null) - throw new org.apache.tools.ant.BuildException("makefile attribute is not defined"); - self.log("Makefile: " + attributes.get("makefile")); - String target = "all"; - String custom = ""; - String annofileDir = ""; - if (attributes.get("target") != null) - target = attributes.get("target"); - self.log("Target: " + target); - if (attributes.get("custom") != null) - custom = attributes.get("custom"); - if (attributes.get("root") != null) - root = attributes.get("root"); - else - root = ""; - - self.log("Custom: " + custom); +self.setTaskName("emake"); +// check attributes +if (attributes.get("name") == null) { + throw new org.apache.tools.ant.BuildException("name attribute is not defined"); +} +self.log("Name: " + attributes.get("name")); +if (attributes.get("makefile") == null) { + throw new org.apache.tools.ant.BuildException("makefile attribute is not defined"); +} +self.log("Makefile: " + attributes.get("makefile")); +String target = "all"; +String custom = ""; +String annofileDir = ""; +if (attributes.get("target") != null) { + target = attributes.get("target"); +} +self.log("Target: " + target); +if (attributes.get("custom") != null) { + custom = attributes.get("custom"); +} +if (attributes.get("root") != null) { + root = attributes.get("root"); +} +else { + root = ""; +} + +self.log("Custom: " + custom); - // Create and configure exec target - org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask(); - task.setProject(self.getProject()); - task.setTaskName(self.getTaskName()); - String emake = com.nokia.ant.util.Helper.getProperty(project, "ec.emake"); - task.setExecutable(emake); - if (attributes.get("failonerror") != null) { - task.setFailonerror(Boolean.parseBoolean(attributes.get("failonerror"))); - } else { - task.setFailonerror(true); - } - String buildDrive = com.nokia.ant.util.Helper.getProperty(project, "build.drive"); - task.setDir(new java.io.File(buildDrive + "/")); - if (attributes.get("log") != null) { - self.log("Log: " + attributes.get("log")); - task.setOutput(new java.io.File(attributes.get("log"))); - } - if (attributes.get("dir") != null) { - self.log("dir: " + attributes.get("dir")); - task.setDir(new java.io.File(attributes.get("dir"))); - } - String buildId = com.nokia.ant.util.Helper.getProperty(project, "build.id"); - task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name")); - String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class"); - task.createArg().setValue("--emake-class=" + eclass); - String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT"); - String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); - if (attributes.get("root") != null) { - self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root); - } - task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root); - if (attributes.get("phase") != null) { - annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase"); - } - else { - annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir"); - } - if (attributes.get("annodetail") != null) { - task.createArg().setValue("--emake-annodetail=" + attributes.get("annodetail")); - task.createArg().setValue("--emake-annofile=" + annofileDir + "/" + buildId + "-" + attributes.get("name") + ".emake.anno.xml"); - } - task.createArg().setLine(custom); - task.createArg().setLine("-f " + attributes.get("makefile")); - task.createArg().setLine(target); - // Execute. - task.execute(); +// Create and configure exec target +org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask(); +task.setProject(self.getProject()); +task.setTaskName(self.getTaskName()); +String emake = com.nokia.ant.util.Helper.getProperty(project, "ec.emake"); +task.setExecutable(emake); +if (attributes.get("failonerror") != null) { + task.setFailonerror(Boolean.parseBoolean(attributes.get("failonerror"))); +} +else { + task.setFailonerror(true); +} +String buildDrive = com.nokia.ant.util.Helper.getProperty(project, "build.drive"); +task.setDir(new java.io.File(buildDrive + "/")); +if (attributes.get("log") != null) { + self.log("Log: " + attributes.get("log")); + task.setOutput(new java.io.File(attributes.get("log"))); +} +if (attributes.get("dir") != null) { + self.log("dir: " + attributes.get("dir")); + task.setDir(new java.io.File(attributes.get("dir"))); +} +String buildId = com.nokia.ant.util.Helper.getProperty(project, "build.id"); +task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name")); +String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class"); +task.createArg().setValue("--emake-class=" + eclass); +String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT"); +String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); +if (attributes.get("root") != null) { + self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root); +} +task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root); +if (attributes.get("phase") != null) { + annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase"); +} +else { + annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir"); +} +if (attributes.get("annodetail") != null) { + task.createArg().setValue("--emake-annodetail=" + attributes.get("annodetail")); + task.createArg().setValue("--emake-annofile=" + annofileDir + "/" + buildId + "-" + attributes.get("name") + ".emake.anno.xml"); +} +task.createArg().setLine(custom); +task.createArg().setLine("-f " + attributes.get("makefile")); +task.createArg().setLine(target); + +task.execute(); @@ -325,21 +325,21 @@ - + ]]> - + ]]>