Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#31 Add "context" variables

Next_Release
closed
Andre-Littoz
General (16)
5
2012-03-24
2012-03-01
Andre-Littoz
No

The Linux kernel runs on many different architectures. The specific parts are located in subdirectories of /arch. This is easily handled with the 'a' (architecture) variable and one 'incprefix' and one 'maps' directives. However some architectures have variants with specific code in other subdirectories. These could also be handled by other variables, but this gives many, many buttons or link lines in the page header (leading to visual confusion and bad legibility).

Since these variables are meaningful only in the context of their associated 'a' value, it is much better to display them only if the 'a' variable has the appropriate value.

This could be done by defining a new attribute in 'variables' as 'when' => 'string containing a conditional expr'
e.g.
{ 'arm_mach' =>
{ 'name' => 'Arm machine'
, 'when' => '"$a" eq "arm"
, 'range' => [qw(at91 bcmring ... )]
}
}

The 'when' attribute is evaluated when there is need to display variables list. Should it also be evaluated when variable value is substituted? Are there circumstances that require to drop meaningless variables?

Discussion

  • Andre-Littoz
    Andre-Littoz
    2012-03-24

    • assigned_to: nobody --> ajlittoz
    • labels: --> General
    • status: open --> closed
     
  • Andre-Littoz
    Andre-Littoz
    2012-03-24

    This feature has been implemented in CVS, will be available in 0.12 release.
    To facilitate its use, a new script will be added to collect relevant information for kernel tree.