<!-- +=====================================================================+ -->
<!-- |                                                                     | -->
<!-- |                           u t i l s . x m l                         | -->
<!-- |                                                                     | -->
<!-- +=====================================================================+ -->

<project name="utils" basedir="..">
    
    <description>
	Just a collection of utility targets
	(not part of main-stream Audiveris project)
    </description>

    <!-- Give users first chance to override properties -->
    <property file="${user.home}/.audiveris/build.properties"/>

    <property name="dev.dir"          location="${basedir}/src"/>
    <property name="config.dir"       location="${basedir}/config"/>
    <property name="nb.javadoc.dir"   location="${basedir}/dist/javadoc"/>

    <!-- Give users second chance to override properties -->
    <property file="${dev.dir}/build.properties"/>

    <!-- Finally, get all default property values -->
    <property file="${dev.dir}/build.default.properties"/>

    <!-- Load the environment variables -->
    <property environment="env"/>

    
    <!-- ======== -->
    <!--  S A V E -->
    <!-- ======== -->
    <target name="save"
        depends="-init"
        description="Make a backup of all important files." >
	
        <mkdir dir="${backup.dir}/${ant.project.name}"/>

        <!-- Save relevant directories -->
        <zip
            update="yes"
            destfile="${backup.dir}/${ant.project.name}/${DSTAMP}-${machine.name}-src.zip" >
            <fileset dir="${basedir}"  
                     includes="build.xml, src/**, config/**, icons/**, www/**, train/*.def, nb/jp/**"
                     excludes="${dist.excludes},www/docs/api/**,www/branding/**,nb/jp/dist/**"/>
        </zip>

    </target>

    
    <!-- ============= -->
    <!--  U P L O A D  -->
    <!-- ============= -->
    <target name="upload"
            depends="save"
            description="Upload backup to personal pages on an FTP server.">

	<echo message="Uploading backup file ..."/>
	<copy
	    verbose="${verbose}"
	    todir="${netbackup.dir}/${ant.project.name}">
	    <fileset dir="${backup.dir}/${ant.project.name}">
		<include name="**/${DSTAMP}-${machine.name}-*.zip"/>
	    </fileset>
	</copy>
    </target>
    
    <!-- ======= -->
    <!--  U M L  -->
    <!-- ======= -->
    <target name="uml"
            depends="-uml"
	    description="Generation of UML drawings"/>
    

    <target name="global-update" description="garbage">
        <replaceregexp replace=""
                         match="//  to report bugs .*//$" >
            <fileset dir="${src.dir}" 
                     includes="**/Main.java"
                     />
        </replaceregexp>
    </target>

    <target name="zip-java" description="zip all Java files">
        <zip
            destfile="${src.dir}/../newfiles.zip" >

            <!-- Launcher -->
            <zipfileset dir="${src.dir}/.."
                     includes="**/*.java"
                     />

        </zip>
    </target>

    
</project>

Build file for side utilities, not mandatory for Audiveris main build
Build file for side utilities, not mandatory for Audiveris main build
