Well, I can tell you what helped me. Unfortunately I still couldn't find any documentation so a lot of trial and error was involved.
If you want to generate JS bindings for Safari you have to:
- Modify 'DerivedSources.make'.
- Make sure your IDL files are correct.
'DerivedSources.make' can be found in '\WebKit\Source\WebCore\'. Inside this make file you have to specify the following:
- The path to your folder (containing the IDL files) in 'VPATH'.
- Each and all of your IDL files in 'BINDINGS_IDLS'.
- Again the path to your folder in 'IDL_INCLUDES'.
Build WebKit. If after this step you still can't see your JSXXX.h and JSXXX.cpp files (genererated for each XXX.IDL file) than you have to check your IDL files.
In my case nothing was generated after the build step and I got an error like this:
6>Next token should be implements, but MyModule at module MyModule {
6> IDLParser.pm:750 at /WebKit/Source/WebCore/bindings/scripts//IDLParser.pm line 129.
6> in /WebKit/Source/WebCore/MyFolder/XXX.idl at /WebKit/Source/WebCore/bindings/scripts//IDLParser.pm line 173.
6>/WebKit/Source/WebCore/DerivedSources.make:1024: recipe for target `XXX.h' failed
6>make: * [XXX.h] Error 255
The problem was that each of the IDL interfaces where enclosed in a module (namespace) called MyModule as you can see above. I've removed all this modules (keeping the interfaces of course) and at the next build everything was generated just fine. Using your own module name seems to not be as straight-forward as enclosing the IDL interfaces with it; most probably you'd be forced to write custom bindings to accomplish this (which is not recommended by the WebKit team).
So that was it for me, hope it's also helpful to you.