<project name="build.convert">
    <import file="properties.xml" />
    <import file="preset-defs.xml" />

    <target name="convert.www" description="Convert WWW Xilize files to XHTML">
        <xilize args="-do ${www.dir}" />
    </target>
    
    <target name="convert.guide" depends="check.app.version, jar.core" description="Convert User's Guide Xilize files to XHTML and PDF">
        <property name="ugxil" value="${guide}/users-guide-${app.version}.xil" />
        <fail message="Can't find User's Guide file named ${ugxil}.">
            <condition>                                                     
                <not>
                    <available file="${ugxil}" />
                </not>
            </condition>
        </fail>
        <delete file="${guide}/users-guide-${app.version}.html" />

        <xilize args="${ugxil}" />
        <property name="ughtml" value="${guide}/users-guide-${app.version}.html" />
        <property name="ugpdf" value="${guide}/users-guide-${app.version}.pdf" />
        <fail message="Can't find User's Guide file named ${ughtml}. Did Xilize fail to run?">
            <condition>
                <not>
                    <available file="${ughtml}" />
                </not>
            </condition>
        </fail>
        <delete file="${ugpdf}" />
       <fs_to_pdf args="${ughtml} ${ugpdf}" />
    </target>
</project>
