Index: libadblockplus.gyp |
=================================================================== |
--- a/libadblockplus.gyp |
+++ b/libadblockplus.gyp |
@@ -8,22 +8,57 @@ |
'include', |
'third_party/v8/include' |
], |
'dependencies': ['third_party/v8/tools/gyp/v8.gyp:v8'], |
'sources': [ |
'src/ConsoleJsObject.cpp', |
'src/ErrorCallback.cpp', |
'src/FileReader.cpp', |
- 'src/JsEngine.cpp' |
+ 'src/JsEngine.cpp', |
+ '<(INTERMEDIATE_DIR)/adblockplus.js.cc' |
], |
'direct_dependent_settings': { |
'include_dirs': ['include'] |
}, |
- 'export_dependent_settings': ['third_party/v8/tools/gyp/v8.gyp:v8'] |
+ 'export_dependent_settings': ['third_party/v8/tools/gyp/v8.gyp:v8'], |
+ 'actions': [{ |
+ 'action_name': 'convert_js', |
+ 'variables': { |
+ 'core_library_files': [ |
+ 'adblockplus/lib/filterNotifier.js', |
+ 'adblockplus/lib/filterClasses.js', |
+ 'adblockplus/lib/subscriptionClasses.js', |
+ 'adblockplus/lib/filterStorage.js', |
+ 'adblockplus/lib/elemHide.js', |
+ 'adblockplus/lib/matcher.js', |
+ 'adblockplus/lib/filterListener.js', |
+ 'adblockplus/lib/synchronizer.js', |
+ ], |
+ 'additional_library_files': [ |
+ 'lib/adblockplus_compat.js' |
+ ], |
+ }, |
+ 'inputs': [ |
+ 'convert_js.py', |
+ '<@(core_library_files)', |
+ '<@(additional_library_files)', |
+ ], |
+ 'outputs': [ |
+ '<(INTERMEDIATE_DIR)/adblockplus.js.cpp' |
+ ], |
+ 'action': [ |
+ 'python', |
+ 'convert_js.py', |
+ '<@(core_library_files)', |
+ '--', |
+ '<@(additional_library_files)', |
+ '<@(_outputs)', |
+ ] |
+ }] |
}, |
{ |
'target_name': 'tests', |
'type': 'executable', |
'dependencies': [ |
'third_party/googletest.gyp:googletest_main', |
'libadblockplus' |
], |