> Initially I tried to include a locals.json in config.json, where
> locals.josn contained nothing else than the definition of
> QOOXDOO_PATH. Didn't work - the generator disregarded the value
> defined in locals.json.
>
> Then I tried to rename config.json to config-original.json, create a
> new config.json which just includes config-original.json, and has
> QOOXDOO_PATH defined in an own let block. Didn't help either - the
> same problem occured - QOOXDOO_PATH was still undefined in the build
> jobs inherited from config-original.json.

I assume your modified config.json looked like this:

{
  "include" : [
    {
      "path" : "config-original.json"
    }
  ],

  "let" : {
    "QOOXDOO_PATH" : "your/qooxdoo/path"
  }
}

right?! Your intuition was quite right, and this probably would work
with any macro *other* than QOOXDOO_PATH :). The reason for this is
that QOOXDOO_PATH is used to find other include files, i.e. when you
look in your config-original.json, you'll find an "include" section
with a line like '"path" :
"${QOOXDOO_PATH}/tool/data/config/application.json"'. But the macros
used in the top-level "include" section have to be defined *locally*
in the same config file. (This is due to the depth-first recursion of
the "include" processing; your config.json is basically saying to
config-original.json "do your includes first, then I include you", so
config-original.json has only local knowledge to do its includes).

So the error you should have reported for the above scenario should be
something like "No such file or directory:
u'.../${QOOXDOO_PATH}/tool/data/config/application.json'"


> Is
> there a way to pass the qooxdoo path as a command line value to
> generate.py?

There is: You can give a macro a value on the command line:

   generate.py -m QOOXDOO_PATH:your/qooxdoo/path  ...

You might need to apply proper quoting to the cl args, depending on
the shell you are using.


T.

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to