Hi Daniel:
Currently you'd have to have another whole conditional inside:

'conditions': [
 ['my_variable=="Blort"', {
   # path A
 }, {
   'conditions:
     ['my_variable=="Blat"', {
       # path B
     }, {
       # path C (default)
     }],
 }],

-BradN

On Wed, Jun 24, 2009 at 2:49 PM, Daniel Cowx <[email protected]> wrote:

>
> I'd like to be able to test 'my_variable' for 'Blort' and 'Blat', but
> if neither of these are true, then I'd like to execute a default. The
> problem is that with the syntax below, if 'my_variable' is 'Blort',
> then both path A and C will be executed; which is wrong since each of
> these paths should be mutually exclusive.
>
> 'conditions': [
>  ['my_variable=="Blort"', {
>    # path A
>  }],
>  ['my_variable=="Blat"', {
>    # path B
>  }, {
>    # path C (default)
>  }],
>
> To fix, I've tried re-arranging like so:
>
> 'conditions': [
>  ['my_variable=="Blort"', {
>    # path A
>  }, {
>    ['my_variable=="Blat"', {
>      # path B
>    }, {
>      # path C (default)
>    }],
>  }],
>
> But this gives errors when you execute the gyp file (complains about a
> comma). How do I accomplish this?
> >
>

--~--~---------~--~----~------------~-------~--~----~
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to