This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: additional compiler options in cdl script
>>>>> "mohanlal" == mohanlal jangir <mohanlaljangir@hotmail.com> writes:
Mohanlal> I have yet another question. The package I am adding
Mohanlal> belongs to two templates, net as well as old_net. But I
Mohanlal> want different kind of activation (using active_if
Mohanlal> <expression> in my package) depending on the current
Mohanlal> selected template. So how can differentiate between net
Mohanlal> and old_net. I mean, is some flag or variable defined,
Mohanlal> when a particular template is selected?
No. A template can be just a starting point for a configuration. You
could start with e.g. the old_net template, remove various packages,
add replacements, manipulate some options, and end up with something
equivalent to the net template. The ecos.ecc savefile would still list
old_net as the template, so having application code check for the
template would be a bad idea.
Instead you want to #include <pkgconf/system.h> and look for specific
packages, e.g. CYGPKG_NET_OPENBSD_STACK or CYGPKG_NET_FREEBSD_STACK.
That avoids any ambiguities.
Bart
--
Bart Veer eCos Configuration Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss