Changeset 219289 in webkit
- Timestamp:
- Jul 10, 2017 6:19:55 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r219276 r219289 1 2017-07-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Move make-js-file-arrays.py from WebCore to JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=174024 5 6 Reviewed by Michael Catanzaro. 7 8 Make MAKE_JS_FILE_ARRAYS independent of WebCore and update it to use make-js-file-arrays.py from 9 JavaScriptCore. It's no longer needed to set PYTHON_PATH to find jsmin.py. 10 11 * Source/cmake/WebKitMacros.cmake: 12 1 13 2017-07-08 Yusuke Suzuki <utatane.tea@gmail.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r219285 r219289 1 2017-07-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Move make-js-file-arrays.py from WebCore to JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=174024 5 6 Reviewed by Michael Catanzaro. 7 8 It's currently used only by WebCore, but it depends on other JavaScriptCore scripts and it's not WebCore 9 specific at all. I plan to use it to compile the JavaScript atoms used by the WebDriver implementation. 10 Added command line option to pass the namespace to use instead of using WebCore. 11 12 * JavaScriptCore.xcodeproj/project.pbxproj: 13 * Scripts/make-js-file-arrays.py: Renamed from Source/WebCore/Scripts/make-js-file-arrays.py. 14 (main): 15 1 16 2017-07-09 Yusuke Suzuki <utatane.tea@gmail.com> 2 17 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r219009 r219289 1901 1901 A5EA710C19F6DE820098F5EC /* objc_generator.py in Headers */ = {isa = PBXBuildFile; fileRef = A5EA70F819F6DE5A0098F5EC /* objc_generator.py */; settings = {ATTRIBUTES = (Private, ); }; }; 1902 1902 A5EA710E19F6DF810098F5EC /* InspectorAlternateBackendDispatchers.h in Headers */ = {isa = PBXBuildFile; fileRef = A5EA710D19F6DF810098F5EC /* InspectorAlternateBackendDispatchers.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1903 A5EF13F91F073204000F0442 /* make-js-file-arrays.py in Headers */ = {isa = PBXBuildFile; fileRef = A5EF13F71F0731B4000F0442 /* make-js-file-arrays.py */; settings = {ATTRIBUTES = (Private, ); }; }; 1903 1904 A5EF9B141A1D43F600702E90 /* generate_cpp_backend_dispatcher_header.py in Headers */ = {isa = PBXBuildFile; fileRef = C4F4B6D11A05C76F005CAB76 /* generate_cpp_backend_dispatcher_header.py */; settings = {ATTRIBUTES = (Private, ); }; }; 1904 1905 A5EF9B151A1D43FA00702E90 /* generate_cpp_backend_dispatcher_implementation.py in Headers */ = {isa = PBXBuildFile; fileRef = C4F4B6D21A05C76F005CAB76 /* generate_cpp_backend_dispatcher_implementation.py */; settings = {ATTRIBUTES = (Private, ); }; }; … … 4533 4534 A5EA70F819F6DE5A0098F5EC /* objc_generator.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = objc_generator.py; sourceTree = "<group>"; }; 4534 4535 A5EA710D19F6DF810098F5EC /* InspectorAlternateBackendDispatchers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorAlternateBackendDispatchers.h; sourceTree = "<group>"; }; 4536 A5EF13F71F0731B4000F0442 /* make-js-file-arrays.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = "make-js-file-arrays.py"; sourceTree = "<group>"; }; 4535 4537 A5FC84B01D1DDAC8006B5C46 /* DebuggerLocation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DebuggerLocation.cpp; sourceTree = "<group>"; }; 4536 4538 A5FC84B11D1DDAC8006B5C46 /* DebuggerLocation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DebuggerLocation.h; sourceTree = "<group>"; }; … … 7828 7830 9959E9291BD17FA0001AA413 /* jsmin.py */, 7829 7831 99DA00AD1BD5993E00F4575C /* lazywriter.py */, 7832 A5EF13F71F0731B4000F0442 /* make-js-file-arrays.py */, 7830 7833 99DA00AE1BD5993E00F4575C /* UpdateContents.py */, 7831 7834 9959E92A1BD17FA0001AA413 /* xxd.pl */, … … 9222 9225 860161E50F3A83C100F84710 /* MacroAssemblerX86_64.h in Headers */, 9223 9226 860161E60F3A83C100F84710 /* MacroAssemblerX86Common.h in Headers */, 9227 A5EF13F91F073204000F0442 /* make-js-file-arrays.py in Headers */, 9224 9228 A700873A17CBE85300C3E643 /* MapConstructor.h in Headers */, 9225 9229 A74DEF94182D991400522C22 /* MapIteratorPrototype.h in Headers */, -
trunk/Source/JavaScriptCore/Scripts/make-js-file-arrays.py
r219288 r219289 42 42 43 43 def main(): 44 parser = OptionParser(usage="usage: %prog [ --no-minify] header source [input [input...]]")44 parser = OptionParser(usage="usage: %prog [options] header source [input [input...]]") 45 45 parser.add_option('--no-minify', action='store_true', help='Do not run the input files through jsmin') 46 parser.add_option('-n', '--namespace', help='Namespace to use') 46 47 (options, arguments) = parser.parse_args() 48 if not options.namespace: 49 print 'Error: must provide a namespace' 50 parser.print_usage() 51 exit(-1) 47 52 if len(arguments) < 3: 48 53 print 'Error: must provide at least 3 arguments' … … 50 55 exit(-1) 51 56 57 namespace = options.namespace 52 58 headerPath = arguments[0] 53 59 sourcePath = arguments[1] … … 55 61 56 62 headerFile = open(headerPath, 'w') 57 print >> headerFile, 'namespace WebCore {'63 print >> headerFile, 'namespace {0:s} {{'.format(namespace) 58 64 59 65 sourceFile = open(sourcePath, 'w') 60 66 print >> sourceFile, '#include "{0:s}"'.format(os.path.basename(headerPath)) 61 print >> sourceFile, 'namespace WebCore {'67 print >> sourceFile, 'namespace {0:s} {{'.format(namespace) 62 68 63 69 jsm = JavascriptMinify() … … 85 91 print >> sourceFile, '};' 86 92 87 print >> headerFile, '} '88 print >> sourceFile, '} '93 print >> headerFile, '}} // namespace {0:s}'.format(namespace) 94 print >> sourceFile, '}} // namespace {0:s}'.format(namespace) 89 95 90 96 if __name__ == '__main__': -
trunk/Source/WebCore/CMakeLists.txt
r219229 r219289 3749 3749 ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScriptsData.cpp 3750 3750 ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScripts.h 3751 WebCore 3751 3752 WebCore_USER_AGENT_SCRIPTS 3752 3753 WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES 3753 3754 ) 3755 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/UserAgentScriptsData.cpp) 3754 3756 endif () 3755 3757 … … 3765 3767 ${DERIVED_SOURCES_WEBCORE_DIR}/SDPProcessorScriptsData.cpp 3766 3768 ${DERIVED_SOURCES_WEBCORE_DIR}/SDPProcessorScriptsData.h 3769 WebCore 3767 3770 WebCore_SDP_PROCESSOR_SCRIPTS 3768 3771 WebCore_SDP_PROCESSOR_SCRIPTS_DEPENDENCIES 3769 3772 ) 3773 list(APPEND WebCore_DERIVED_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/SDPProcessorScriptsData.cpp) 3770 3774 endif () 3771 3775 -
trunk/Source/WebCore/ChangeLog
r219288 r219289 1 2017-07-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Move make-js-file-arrays.py from WebCore to JavaScriptCore 4 https://bugs.webkit.org/show_bug.cgi?id=174024 5 6 Reviewed by Michael Catanzaro. 7 8 * CMakeLists.txt: Explicitly add files generated by MAKE_JS_FILE_ARRAYS to the build, since the macro no longer 9 does it. 10 * DerivedSources.make: Updated to use make-js-file-arrays.py from JavaScriptCore. It's no longer needed to set 11 PYTHON_PATH to find jsmin.py. 12 1 13 2017-07-10 Charlie Turner <cturner@igalia.com> 2 14 -
trunk/Source/WebCore/DerivedSources.make
r218529 r219289 1110 1110 all : SDPProcessorScriptsData.h 1111 1111 1112 SDPProcessorScriptsData.h : Scripts/make-js-file-arrays.py $(WEBCORE_SDP_PROCESSOR_SCRIPTS)1113 PYTHONPATH=$(JavaScriptCore_SCRIPTS_DIR) $(PYTHON) $<$@ SDPProcessorScriptsData.cpp $(WEBCORE_SDP_PROCESSOR_SCRIPTS)1112 SDPProcessorScriptsData.h : $(JavaScriptCore_SCRIPTS_DIR)/make-js-file-arrays.py $(WEBCORE_SDP_PROCESSOR_SCRIPTS) 1113 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/make-js-file-arrays.py -n WebCore $@ SDPProcessorScriptsData.cpp $(WEBCORE_SDP_PROCESSOR_SCRIPTS) 1114 1114 endif 1115 1115 … … 1165 1165 all : UserAgentScripts.h 1166 1166 1167 UserAgentScripts.h : Scripts/make-js-file-arrays.py $(USER_AGENT_SCRIPTS)1168 PYTHONPATH=$(JavaScriptCore_SCRIPTS_DIR) $(PYTHON) $<$@ UserAgentScriptsData.cpp $(USER_AGENT_SCRIPTS)1167 UserAgentScripts.h : $(JavaScriptCore_SCRIPTS_DIR)/make-js-file-arrays.py $(USER_AGENT_SCRIPTS) 1168 $(PYTHON) $(JavaScriptCore_SCRIPTS_DIR)/make-js-file-arrays.py -n WebCore $@ UserAgentScriptsData.cpp $(USER_AGENT_SCRIPTS) 1169 1169 endif 1170 1170 -
trunk/Source/cmake/WebKitMacros.cmake
r219228 r219289 397 397 endmacro() 398 398 399 macro(MAKE_JS_FILE_ARRAYS _output_cpp _output_h _scripts _scripts_dependencies) 400 if (NOT CMAKE_VERSION VERSION_LESS 3.1) 401 set(_python_path ${CMAKE_COMMAND} -E env "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}") 402 elseif (WIN32) 403 set(_python_path set "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}" &&) 404 else () 405 set(_python_path "PYTHONPATH=${JavaScriptCore_SCRIPTS_DIR}") 406 endif () 407 399 macro(MAKE_JS_FILE_ARRAYS _output_cpp _output_h _namespace _scripts _scripts_dependencies) 408 400 add_custom_command( 409 401 OUTPUT ${_output_h} ${_output_cpp} 410 MAIN_DEPENDENCY ${WEBCORE_DIR}/Scripts/make-js-file-arrays.py 411 DEPENDS ${${_scripts}} 412 COMMAND ${_python_path} ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/Scripts/make-js-file-arrays.py ${_output_h} ${_output_cpp} ${${_scripts}} 413 VERBATIM) 414 list(APPEND WebCore_DERIVED_SOURCES ${_output_cpp}) 402 DEPENDS ${JavaScriptCore_SCRIPTS_DIR}/make-js-file-arrays.py ${${_scripts}} 403 COMMAND ${PYTHON_EXECUTABLE} ${JavaScriptCore_SCRIPTS_DIR}/make-js-file-arrays.py -n ${_namespace} ${_output_h} ${_output_cpp} ${${_scripts}} 404 VERBATIM) 415 405 ADD_SOURCE_DEPENDENCIES(${${_scripts_dependencies}} ${_output_h} ${_output_cpp}) 416 406 endmacro()
Note: See TracChangeset
for help on using the changeset viewer.