tracesrv/tracecompiler/group/ccbuild.xml
author hgs
Tue, 26 Oct 2010 16:20:32 +0300
changeset 62 1c2bb2fc7c87
permissions -rw-r--r--
201043

<!--
#
# Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description: 
#
-->
<project name="OstTraceCompiler" default="build" basedir="..">

<target name="init">
	<property environment="env" />
	<property name="src.dir" value="src" />
	<property name="jar.dir" value="jar" />
	<property name="dest.dir" value="${env.EPOCROOT}epoc32\tools\tracecompiler" />
	<property name="build.dir" value="${env.EPOCROOT}epoc32\build\ost\tracecompiler" />
</target>


<target name="clean" depends="init">
	<echo>Cleaning the ${build.dir}</echo>
	<delete dir="${build.dir}"/>
	<echo>Creating the build directory</echo>
	<mkdir dir="${build.dir}"/>
	
	<echo>Deleting *.xml_ files</echo>
	<delete>
		<fileset dir="${env.EPOCROOT}epoc32\build" includes="**/*.xml_"/>
	</delete>
</target>

	
<target name="what" depends="init" description="Prints out all releasables">		
	<pathconvert pathsep="${line.separator}" property="output">
		<fileset dir="${dest.dir}" casesensitive="no">
		</fileset>
	</pathconvert>
	<echo message="${output}" />
</target>


<target name="build" depends="clean">
	<javac srcdir="${src.dir}" destdir="${build.dir}" debug="true" target="1.5">
        <exclude name="**/*Test.java"/>
        <exclude name="**/Mock*.java"/>
    </javac>

	<copy todir="${build.dir}">
		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
		<fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.html"/>
        <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.lic"/>
	</copy>

	<exec executable="attrib">
		<arg value="-r"/>
		<arg value="tracecompiler/tracecompiler.zip"/>
	</exec>

	<echo>Zip TraceCompiler binaries</echo>
	<zip destfile="tracecompiler/tracecompiler.zip" update="true">
		<zipfileset dir="${build.dir}"/> 
	</zip>
	
	
	<echo>Unzip recompiled TraceCompiler binaries intop epoc32\tools\tracecompiler</echo>
	<unzip src="tracecompiler/tracecompiler.zip" dest="${dest.dir}" overwrite="true"/>


	<mkdir dir="${jar.dir}"/>

       	<jar destfile="${jar.dir}/tracecompiler.jar" basedir="${build.dir}">
                <fileset dir="src/com.nokia.tracecompiler/src" includes="**/*.properties"/>
                <manifest>
                	<attribute name="Main-Class" value="com.nokia.tracecompiler.TraceCompilerMain"/>
            	</manifest>
        </jar>


</target>




</project>