This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: calculated value for "compile" attribute of CDL component?


On Fri, Mar 08, 2002 at 02:02:52PM +0000, Bart Veer wrote:

> I am afraid it is just a literal list, not an expression.

That's experimentation seemed to indicate.

> Most of the time people can achieve what they need simply by
> putting compile properties into components or options, rather
> than putting them all in the cdl_package definition.

[...]

What I ended up with was something like this:

cdl_package ABC {
  flavor data
  legal_values { "DEF", "GHI" }

  compile always.c

  cdl_component ABC__DEF {
    no_define
    flavor none
    active_if { ABC == "DEF" }
    compile sometimes.c
    }

  cdl_component ABC__GHI {
    no_define
    flavor none
    active_if { ABC == "GHI" }
    compile occasional.c
    }
}

It's a little bit more verbose than using a TCL expression for
the compile list, but it does exactly the same thing.

-- 
Grant Edwards
grante@visi.com

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]