variable not defined on my own define-rule

Jeremy Cowgar <[email protected]> Sat, 12 Sep 2009 15:12:07 +0000 (UTC)
Newsgroups gmane.comp.sysutils.bakefile.devel
Message-ID <[email protected]>
I am having problems setting up my own define rule. The problem I have is that 
bakefile says: "error: failed to set variable '__s' to value '$(__source)': 
name '__source' is not defined"

The rule I have created is:

<define-rule name="euphoria" extends="action">
    <template>
        <is-phony />
        <set var="__build_dir">$(id)_dir</set>
        <set var="__output">..$(DIRSEP)$(id)$(EXE_EXT)</set>
        <set var="__lib">..$(DIRSEP)eu$(LIB_EXT)</set>
        <set var="__include">..$(DIRSEP)include</set>
        <command>eui ec.ex -con $(EUC_FLAGS) -i $(__include) -builddir 
$(__build_dir) -keep -o $(__output) -lib $(__lib) $(__source)</command>
        <dependency-of>all</dependency-of>
    </template>
    <define-tag name="source">
        <set var="__source">$(value)</set>
    </define-tag>
</define-rule>

An example use of the rule is:
    
<euphoria id="eui">
    <source>int.ex</source>
</euphoria>

Can anyone shed some light on what I am doing wrong?

Thanks,

Jeremy



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july