diff options
author | Refael Ackermann <refack@gmail.com> | 2018-09-27 10:45:24 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2018-10-02 17:53:14 -0400 |
commit | 375e16eef20f4538c172d9b27a133df1ccca1569 (patch) | |
tree | 2366b08e64abcf1a6bf759ab3fa378345e2d98b5 /node.gyp | |
parent | 6dd4a077c0fd2bcd964dd6195b80fef66b5e4c3b (diff) | |
download | android-node-v8-375e16eef20f4538c172d9b27a133df1ccca1569.tar.gz android-node-v8-375e16eef20f4538c172d9b27a133df1ccca1569.tar.bz2 android-node-v8-375e16eef20f4538c172d9b27a133df1ccca1569.zip |
build: encapsulate node/inspector gyp scafolding
PR-URL: https://github.com/nodejs/node/pull/23156
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r-- | node.gyp | 195 |
1 files changed, 1 insertions, 194 deletions
@@ -491,40 +491,7 @@ 'product_name': 'node_base', }], [ 'v8_enable_inspector==1', { - 'defines': [ - 'HAVE_INSPECTOR=1', - ], - 'sources': [ - 'src/inspector_agent.cc', - 'src/inspector_io.cc', - 'src/inspector_js_api.cc', - 'src/inspector_socket.cc', - 'src/inspector_socket_server.cc', - 'src/inspector/main_thread_interface.cc', - 'src/inspector/worker_inspector.cc', - 'src/inspector/node_string.cc', - 'src/inspector/worker_agent.cc', - 'src/inspector/tracing_agent.cc', - 'src/inspector_agent.h', - 'src/inspector_io.h', - 'src/inspector_socket.h', - 'src/inspector_socket_server.h', - 'src/inspector/main_thread_interface.h', - 'src/inspector/worker_inspector.h', - 'src/inspector/node_string.h', - 'src/inspector/worker_agent.h', - 'src/inspector/tracing_agent.h', - '<@(node_inspector_generated_sources)' - ], - 'dependencies': [ - 'node_protocol_generated_sources#host', - 'v8_inspector_compress_protocol_json#host', - ], - 'include_dirs': [ - '<(SHARED_INTERMEDIATE_DIR)/include', # for inspector - '<(SHARED_INTERMEDIATE_DIR)', - '<(SHARED_INTERMEDIATE_DIR)/src', # for inspector - ], + 'includes' : [ 'src/inspector/node_inspector.gypi' ], }, { 'defines': [ 'HAVE_INSPECTOR=0' ] }], @@ -989,165 +956,5 @@ }, ] }], # end aix section - [ 'v8_enable_inspector==1', { - 'variables': { - 'protocol_path': 'tools/inspector_protocol', - 'node_inspector_path': 'src/inspector', - 'node_inspector_generated_sources': [ - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/Forward.h', - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/Protocol.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/Protocol.h', - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/NodeWorker.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/NodeWorker.h', - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/NodeTracing.cpp', - '<(SHARED_INTERMEDIATE_DIR)/src/node/inspector/protocol/NodeTracing.h', - ], - 'node_protocol_files': [ - '<(protocol_path)/lib/Allocator_h.template', - '<(protocol_path)/lib/Array_h.template', - '<(protocol_path)/lib/Collections_h.template', - '<(protocol_path)/lib/DispatcherBase_cpp.template', - '<(protocol_path)/lib/DispatcherBase_h.template', - '<(protocol_path)/lib/ErrorSupport_cpp.template', - '<(protocol_path)/lib/ErrorSupport_h.template', - '<(protocol_path)/lib/Forward_h.template', - '<(protocol_path)/lib/FrontendChannel_h.template', - '<(protocol_path)/lib/Maybe_h.template', - '<(protocol_path)/lib/Object_cpp.template', - '<(protocol_path)/lib/Object_h.template', - '<(protocol_path)/lib/Parser_cpp.template', - '<(protocol_path)/lib/Parser_h.template', - '<(protocol_path)/lib/Protocol_cpp.template', - '<(protocol_path)/lib/ValueConversions_h.template', - '<(protocol_path)/lib/Values_cpp.template', - '<(protocol_path)/lib/Values_h.template', - '<(protocol_path)/templates/Exported_h.template', - '<(protocol_path)/templates/Imported_h.template', - '<(protocol_path)/templates/TypeBuilder_cpp.template', - '<(protocol_path)/templates/TypeBuilder_h.template', - '<(protocol_path)/CodeGenerator.py', - ] - }, - 'targets': [ - { - 'target_name': 'prepare_protocol_json', - 'type': 'none', - 'toolsets': ['host'], - 'copies': [ - { - 'files': [ - '<(node_inspector_path)/node_protocol_config.json', - '<(node_inspector_path)/node_protocol.pdl' - ], - 'destination': '<(SHARED_INTERMEDIATE_DIR)', - } - ], - 'actions': [ - { - 'action_name': 'convert_node_protocol_to_json', - 'inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/node_protocol.pdl', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/node_protocol.json', - ], - 'action': [ - 'python', - 'tools/inspector_protocol/ConvertProtocolToJSON.py', - '<@(_inputs)', - '<@(_outputs)', - ], - }, - ] - }, - { - 'target_name': 'node_protocol_generated_sources', - 'type': 'none', - 'toolsets': ['host'], - 'dependencies': ['prepare_protocol_json'], - 'actions': [ - { - 'action_name': 'node_protocol_generated_sources', - 'inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/node_protocol_config.json', - '<(SHARED_INTERMEDIATE_DIR)/node_protocol.json', - '<@(node_protocol_files)', - ], - 'outputs': [ - '<@(node_inspector_generated_sources)', - ], - 'action': [ - 'python', - '<(protocol_path)/CodeGenerator.py', - '--jinja_dir', '<@(protocol_path)/..', - '--output_base', '<(SHARED_INTERMEDIATE_DIR)/src/', - '--config', '<(SHARED_INTERMEDIATE_DIR)/node_protocol_config.json', - ], - 'message': 'Generating node protocol sources from protocol json', - }, - ] - }, - { - 'target_name': 'v8_inspector_compress_protocol_json', - 'type': 'none', - 'toolsets': ['host'], - 'copies': [ - { - 'destination': '<(SHARED_INTERMEDIATE_DIR)', - 'files': ['deps/v8/src/inspector/js_protocol.pdl'] - } - ], - 'actions': [ - { - 'action_name': 'v8_inspector_convert_protocol_to_json', - 'inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/js_protocol.pdl', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/js_protocol.json', - ], - 'action': [ - 'python', - 'tools/inspector_protocol/ConvertProtocolToJSON.py', - '<@(_inputs)', - '<@(_outputs)', - ], - }, - { - 'action_name': 'concatenate_protocols', - 'inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/js_protocol.json', - '<(SHARED_INTERMEDIATE_DIR)/node_protocol.json', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/concatenated_protocol.json', - ], - 'action': [ - 'python', - 'tools/inspector_protocol/ConcatenateProtocols.py', - '<@(_inputs)', - '<@(_outputs)', - ], - }, - { - 'action_name': 'v8_inspector_compress_protocol_json', - 'process_outputs_as_sources': 1, - 'inputs': [ - '<(SHARED_INTERMEDIATE_DIR)/concatenated_protocol.json', - ], - 'outputs': [ - '<(SHARED_INTERMEDIATE_DIR)/v8_inspector_protocol_json.h', - ], - 'action': [ - 'python', - 'tools/compress_json.py', - '<@(_inputs)', - '<@(_outputs)', - ], - }, - ], - }, - ] - }] ], # end conditions block } |