buildframework/helium/tools/compile/compile.antlib.xml
changeset 645 b8d81fa19e7d
parent 628 7c4a911dc066
equal deleted inserted replaced
643:27cf35f95864 645:b8d81fa19e7d
   214             </preset.exec>
   214             </preset.exec>
   215             <hlm:assertFileExists file="@{output}"/>
   215             <hlm:assertFileExists file="@{output}"/>
   216         </sequential>
   216         </sequential>
   217     </macrodef>
   217     </macrodef>
   218 
   218 
   219 
       
   220     <!-- Electric Cloud emake support.
   219     <!-- Electric Cloud emake support.
   221 
   220 
   222     e.g:
   221     e.g:
   223 
   222 
   224         <hlm:emakeMacro name="zip-ee" makefile="/foo.mk" log="${build.log.dir}/zip-ee.log" target="zip-all"/>
   223         <hlm:emakeMacro name="zip-ee" makefile="/foo.mk" log="${build.log.dir}/zip-ee.log" target="zip-all"/>
   254 }
   253 }
   255 self.log("Target: " + target);
   254 self.log("Target: " + target);
   256 if (attributes.get("custom") != null) {
   255 if (attributes.get("custom") != null) {
   257     custom = attributes.get("custom");
   256     custom = attributes.get("custom");
   258 }
   257 }
   259 if (attributes.get("root") != null) {
       
   260     root = attributes.get("root");
       
   261 }
       
   262 else {
       
   263     root = "";
       
   264 }
       
   265 
       
   266 self.log("Custom: " + custom);
   258 self.log("Custom: " + custom);
   267 
   259 
   268 // Create and configure exec target
   260 // Create and configure exec target
   269 org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask();
   261 org.apache.tools.ant.taskdefs.ExecTask task = new org.apache.tools.ant.taskdefs.ExecTask();
   270 task.setProject(self.getProject());
   262 task.setProject(self.getProject());
   289 }
   281 }
   290 String buildId = com.nokia.ant.util.Helper.getProperty(project, "build.id");
   282 String buildId = com.nokia.ant.util.Helper.getProperty(project, "build.id");
   291 task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name"));
   283 task.createArg().setValue("--emake-build-label=" + buildId + "-" + attributes.get("name"));
   292 String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class");
   284 String eclass = com.nokia.ant.util.Helper.getProperty(project, "ec.build.class");
   293 task.createArg().setValue("--emake-class=" + eclass);
   285 task.createArg().setValue("--emake-class=" + eclass);
       
   286 
       
   287 // Defining the emake-root argument for the command line.
   294 String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT");          
   288 String eroot = com.nokia.ant.util.Helper.getProperty(project, "env.EMAKE_ROOT");          
   295 String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); 
   289 String heliumDir = com.nokia.ant.util.Helper.getProperty(project, "helium.dir"); 
   296 if (attributes.get("root") != null) {
   290 String pathSeparator = com.nokia.ant.util.Helper.getProperty(project, "path.separator");
   297     self.log("--emake-root=" + eroot + ";" + heliumDir + ";" + root);
   291 String emakeRoot = eroot + pathSeparator + heliumDir;
   298 }         
   292 if (attributes.get("root") != null &amp;&amp; attributes.get("root").length() > 0) {
   299 task.createArg().setValue("--emake-root=" + eroot + ";" + heliumDir + ";" + root);
   293     emakeRoot = emakeRoot + pathSeparator + attributes.get("root");
       
   294 }   
       
   295 self.log("Roots: " + emakeRoot);
       
   296 task.createArg().setValue("--emake-root=" + emakeRoot);
       
   297 
   300 if (attributes.get("phase") != null) {
   298 if (attributes.get("phase") != null) {
   301     annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase");
   299     annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir") + "/" + attributes.get("phase");
   302 }
   300 }
   303 else {
   301 else {
   304     annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir");  
   302     annofileDir = com.nokia.ant.util.Helper.getProperty(project, "build.log.dir");