This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: CDL help wanted
- To: eCos Disuss <ecos-discuss at sourceware dot cygnus dot com>
- Subject: Re: [ECOS] CDL help wanted
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Date: Tue, 13 Nov 2001 19:56:29 +0100
- References: <20011113182608.V15856@biferten.ma.tech.ascom.ch>
On Tue, Nov 13, 2001 at 06:26:08PM +0100, Andrew Lunn wrote:
> Hi Folks
>
> Please could someone help me with some CDL.
>
> I have a big package which has lots of options which enable/disable
> compiling various functions. Associated with each compilable option
> there is a test program. My problem is how to get the test programs
> compiled.
This inference engine is great fun to play with. Reminds me of the
prolog i learn at University. Anyway, im looking at another way of
solving my problem. I have
cdl_option CYGDAT_MYPKG_ACTIVE_TESTS {
display "List off all active tests"
flavor data
default_value {" "}
}
cdl_option CYGDAT_MYPKG_ACTIVE_TESTS_BUILD {
display "List off all active tests"
flavor data
requires is_substr(CYGDAT_MYPKG_ACTIVE_TESTS,CYGPKG_MYPKG_OP1_TESTS) == is_enabled(CYGPKG_MYPKG_OP1);
requires is_substr(CYGDAT_MYPKG_ACTIVE_TESTS,CYGPKG_MYPKG_OP2_TESTS) == is_enabled(CYGPKG_MYPKG_OP2);
requires is_substr(CYGDAT_MYPKG_ACTIVE_TESTS,CYGPKG_MYPKG_OP2_TESTS) == is_enabled(CYGPKG_MYPKG_OP3);
}
So, what i want it to do is if CYGPKG_MYPKG_OP1 is active, make sure
that the list of tests for that package is a substring of
CYGDAT_MYPKG_ACTIVE_TESTS.
This works 50% of the time. Problem is the other 50% of the time,
rather than fiddling with the substrings, it enables/disables my
subpackage! Is there anyway to tell the inference engine that variable
X is fixed, but variable Y its free to change?
Andrew