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: CDL help wanted


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


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