<?xml version="1.0" ?>

<!-- Created by: Francesco Montorsi <frm@users.sourceforge.net>     -->
<!-- Creation date: 9/10/2004                                       -->
<!-- RCS-ID: $Id$ -->

<makefile>

    <!--                                               -->
    <!--               OPTIONAL TARGETS                -->
    <!--                                               -->

    <!-- Add a <make-tarball/> global tag to your bakefile to be able to write:

                 make tarball

         to create a .tar.gz release in the parent's folder of the component.
         Note however that this tag assumes that your project is in a folder
         named $(COMP_NAME).
    -->
    <define-global-tag name="make-tarball">
        <if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
            <cd-and-run id="tarball">
                <!-- deep clean the project before building the tarball: -->
                <command>make distclean</command>

                <!-- <run-tarball> means to be run from $(SRCDIR)/.. -->
                <cd>$(SRCDIR)/..</cd>

                <!-- Use a generic name since we don't know what this tarball contains
                 (i.e. only sources or sources + lib ...) -->
                <run-tarball>$(COMP_NAME).tar.gz</run-tarball>
            </cd-and-run>
        </if>
    </define-global-tag>

    <!-- see comments for <make-tarball/> -->
    <define-global-tag name="make-zip">
        <if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
            <cd-and-run id="zip">
                <!-- deep clean the project before building the tarball: -->
                <depends>clean</depends>

                <!-- delete the old archive -->
                <command>del ..$(DIRSEP)$(SRCDIR)$(DIRSEP)$(COMP_NAME).zip</command>
                
                <!-- <run-tarball> means to be run from $(SRCDIR)/.. -->
                <cd>$(SRCDIR)/..</cd>

                <!-- See http://www.info-zip.org/Zip.html for this free utility -->
                <run-zip>$(COMP_NAME).zip</run-zip>
            </cd-and-run>
        </if>
    </define-global-tag>

    <define-global-tag name="make-docs">
        <if cond="FORMAT_SUPPORTS_ACTIONS=='1'">
            <cd-and-run id="docs">
                <cd>$(SRCDIR)/docs</cd>

                <!-- see http://www.doxygen.org for more info -->
                <run>doxygen</run>
            </cd-and-run>
        </if>
    </define-global-tag>

</makefile>
