Changeset 148586 in webkit


Ignore:
Timestamp:
Apr 16, 2013 6:01:49 PM (11 years ago)
Author:
Patrick Gansterer
Message:

[CMake] Fix dependecy calculation for generated inspector files
https://bugs.webkit.org/show_bug.cgi?id=114092

Reviewed by Brent Fulgham.

At least in a generated Visual Studio solution the files generated via
CodeGeneratorInspector.py are considered outdated all the time because
the code generator only touches the file when the content changed.
Add an --write_always parameter to the script to touch the file always.

  • CMakeLists.txt:
  • inspector/CodeGeneratorInspector.py:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r148463 r148586  
    29672967    MAIN_DEPENDENCY inspector/Inspector.json
    29682968    DEPENDS ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py
    2969     COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py ${WEBCORE_DIR}/inspector/Inspector.json --output_h_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_WEBCORE_DIR}"
     2969    COMMAND ${PYTHON_EXECUTABLE} ${WEBCORE_DIR}/inspector/CodeGeneratorInspector.py ${WEBCORE_DIR}/inspector/Inspector.json --output_h_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --output_cpp_dir "${DERIVED_SOURCES_WEBCORE_DIR}" --write_always
    29702970    VERBATIM)
    29712971list(APPEND WebCore_SOURCES ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorBackendDispatcher.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorFrontend.cpp ${DERIVED_SOURCES_WEBCORE_DIR}/InspectorTypeBuilder.cpp)
  • trunk/Source/WebCore/ChangeLog

    r148585 r148586  
     12013-04-16  Patrick Gansterer  <paroga@webkit.org>
     2
     3        [CMake] Fix dependecy calculation for generated inspector files
     4        https://bugs.webkit.org/show_bug.cgi?id=114092
     5
     6        Reviewed by Brent Fulgham.
     7
     8        At least in a generated Visual Studio solution the files generated via
     9        CodeGeneratorInspector.py are considered outdated all the time because
     10        the code generator only touches the file when the content changed.
     11        Add an --write_always parameter to the script to touch the file always.
     12
     13        * CMakeLists.txt:
     14        * inspector/CodeGeneratorInspector.py:
     15
    1162013-04-16  Anders Carlsson  <andersca@apple.com>
    217
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.py

    r144265 r148586  
    7777cmdline_parser.add_option("--output_h_dir")
    7878cmdline_parser.add_option("--output_cpp_dir")
     79cmdline_parser.add_option("--write_always", action="store_true")
    7980
    8081try:
     
    8586    output_header_dirname = arg_options.output_h_dir
    8687    output_cpp_dirname = arg_options.output_cpp_dir
     88    write_always = arg_options.write_always
    8789    if not output_header_dirname:
    8890        raise Exception("Output .h directory must be specified")
     
    9395    exc = sys.exc_info()[1]
    9496    sys.stderr.write("Failed to parse command-line arguments: %s\n\n" % exc)
    95     sys.stderr.write("Usage: <script> Inspector.json --output_h_dir <output_header_dir> --output_cpp_dir <output_cpp_dir>\n")
     97    sys.stderr.write("Usage: <script> Inspector.json --output_h_dir <output_header_dir> --output_cpp_dir <output_cpp_dir> [--write_always]\n")
    9698    exit(1)
    9799
     
    23442346            pass
    23452347
    2346         if text_changed:
     2348        if text_changed or write_always:
    23472349            out_file = open(self.file_name_, "w")
    23482350            out_file.write(self.output_)
Note: See TracChangeset for help on using the changeset viewer.