Project: Penrose 2.x
Code Location: git://git.fedorahosted.org/git/penrose.gitmaster
Browse
/
Download File
build.xml
<?xml version="1.0"?>
<!--
 Copyright 2009 Red Hat, Inc.
 All rights reserved.
-->
<project name="penrose" default="build">

    <description>Penrose</description>

    <property name="branding.path" value="."/>

    <property file="${branding.path}/build.properties"/>

    <property name="prefix" value=""/>
    <property name="iscc.path" value="ISCC.exe"/>
    <property name="cygwin.home" value="c:/cygwin"/>

    <tstamp>
        <format property="TIMESTAMP" pattern="yyyyMMddHHmmss"/>
    </tstamp>

    <target name="init">
        <echo message="Operating System: ${os.name} ${os.version} (${os.arch})" />
        <echo message="Java Version: ${java.version}" />
        <condition property="isWindows">
            <os family="windows"/>
        </condition>
        <condition property="isUnix">
            <and>
                <os family="unix"/>
                <not>
                    <os family="mac"/>
                </not>
            </and>
        </condition>
        <condition property="isMac">
            <os family="mac"/>
        </condition>
    </target>

    <path id="branding.path">
        <fileset dir="${branding.path}">
            <include name="**/*"/>
        </fileset>
    </path>

    <target name="javacc" depends="init">
        <ant dir="common"  target="javacc"/>
        <ant dir="core"    target="javacc"/>
    </target>
    
    <target name="import" depends="init">
        <ant dir="server"  target="import"/>
    </target>

    <target name="compile" depends="init">
        <ant dir="common"  target="compile"/>
        <ant dir="core"    target="compile"/>
        <ant dir="client"  target="compile"/>
        <ant dir="server"  target="compile"/>
    </target>

    <target name="build" depends="init">
        <ant dir="common"  target="build"/>
        <ant dir="core"    target="build"/>
        <ant dir="client"  target="build"/>
        <ant dir="server"  target="build"/>
    </target>

    <target name="docs" depends="init">
        <ant dir="common"  target="docs"/>
        <ant dir="core"    target="docs"/>
        <ant dir="client"  target="docs"/>
        <ant dir="server"  target="docs"/>
    </target>

    <target name="export" depends="build">
        <mkdir dir="target"/>
        <tar destfile="target/${project.name}-bin.tar.gz" compression="gzip">
            <tarfileset dir="server/bin"/>
        </tar>
        <tar destfile="target/${project.name}-conf.tar.gz" compression="gzip">
            <tarfileset dir="conf"/>
            <tarfileset dir="server/conf"/>
        </tar>
        <tar destfile="target/${project.name}-samples.tar.gz" compression="gzip">
            <tarfileset dir="samples"/>
        </tar>
        <tar destfile="target/${project.name}-schema.tar.gz" compression="gzip">
            <tarfileset dir="schema"/>
        </tar>
        <tar destfile="target/${project.name}-services.tar.gz" compression="gzip">
            <tarfileset dir="services">
                <exclude name="**/build.xml"/>
                <exclude name="**/src/"/>
                <exclude name="**/target/"/>
            </tarfileset>
        </tar>
    </target>

    <target name="export-all" depends="docs,export">
        <tar destfile="target/${project.name}-docs.tar.gz" compression="gzip">
            <tarfileset dir="core/target" includes="javadoc/**"/>
            <tarfileset dir="server/target" prefix="server" includes="javadoc/**"/>
            <tarfileset dir="docs"/>
        </tar>
    </target>

    <target name="dist" depends="init">
        <ant dir="common"  target="dist"/>
        <ant dir="core"    target="dist"/>
        <ant dir="client"  target="dist"/>
        <ant dir="server"  target="dist"/>
    </target>

    <target name="dist-src" depends="init">
        <ant dir="common" target="dist-src"/>
        <ant dir="core"   target="dist-src"/>
        <ant dir="client" target="dist-src"/>
        <ant dir="server" target="dist-src"/>
    </target>

    <target name="dist-macosx" depends="init">
        <ant dir="common" target="dist-macosx"/>
        <ant dir="core"   target="dist-macosx"/>
        <ant dir="client" target="dist-macosx"/>
        <ant dir="server" target="dist-macosx"/>
    </target>

    <target name="dist-unix" depends="init">
        <ant dir="common" target="dist-unix"/>
        <ant dir="core"   target="dist-unix"/>
        <ant dir="client" target="dist-unix"/>
        <ant dir="server" target="dist-unix"/>
    </target>

    <target name="dist-win32" depends="init">
        <ant dir="common" target="dist-win32"/>
        <ant dir="core"   target="dist-win32"/>
        <ant dir="client" target="dist-win32"/>
        <ant dir="server" target="dist-win32"/>
    </target>

    <target name="dist-rpm" depends="dist">
        <ant dir="client" target="dist-rpm"/>
        <ant dir="server" target="dist-rpm"/>
    </target>

    <target name="dist-all" depends="init">
        <ant dir="common" target="dist-all"/>
        <ant dir="core"   target="dist-all"/>
        <ant dir="client" target="dist-all"/>
        <ant dir="server" target="dist-all"/>
    </target>

    <target name="install" depends="init">
        <ant dir="client" target="install"/>
        <ant dir="server" target="install"/>
    </target>

    <target name="uninstall" depends="init">
        <ant dir="client" target="uninstall"/>
        <ant dir="server" target="uninstall"/>
    </target>

    <target name="clean" depends="init">
        <delete dir="dist"   failonerror="false"/>
        <delete dir="target" failonerror="false"/>
        <ant dir="server"  target="clean"/>
        <ant dir="client"  target="clean"/>
        <ant dir="core"    target="clean"/>
        <ant dir="common"  target="clean"/>
    </target>

</project>