Bug 64149

Summary: Write a tools library to manipulate Qt project files
Product: WebKit Reporter: Roland Steiner <rolandsteiner>
Component: Tools / TestsAssignee: Roland Steiner <rolandsteiner>
Status: RESOLVED INVALID    
Severity: Normal CC: abarth, abecsi, dpranke, hausmann, hayato, jturcotte, kling, laszlo.gombos, morrita, ojan, ossy, tony, vestbo, webkit.review.bot, yael, zan
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 63528, 64148    
Bug Blocks: 61772    
Attachments:
Description Flags
work-in-progress
none
WebCore.pro original
none
Reference output of tool
none
patch, requires 82595 none

Description Roland Steiner 2011-07-07 23:42:51 PDT
The webkit-file tool project requires a module to manipulate Qt project files.
Comment 1 Roland Steiner 2011-07-08 01:16:24 PDT
Created attachment 100091 [details]
work-in-progress
Comment 2 Roland Steiner 2011-07-08 01:19:18 PDT
Created attachment 100092 [details]
WebCore.pro original

Sample demonstrating the output - the original WebCore.pro file
Comment 3 Roland Steiner 2011-07-08 01:22:19 PDT
Created attachment 100093 [details]
Reference output of tool

Result of writing above file back using the tool, which is sorted and cleaned. Please holler if you find modifications that are unacceptable!
Comment 4 Tony Chang 2011-07-08 10:00:53 PDT
Adding some Qt devs.
Comment 5 Roland Steiner 2012-03-15 07:20:09 PDT
I'm currently in the process of refactoring and updating the tool suite. New version should come shortly.
Comment 6 Roland Steiner 2012-03-30 04:39:04 PDT
Created attachment 134775 [details]
patch, requires 82595

first review version. Unit tests are subsumed by unit tests for webkitfile.py (see bug 81317)
Comment 7 Tor Arne Vestbø 2012-03-30 05:45:50 PDT
Hmm, I'm not sure manipulating the project files of each build system directly is the way to go (I assume that's the plan?). Have anyone investigated using a generic list of things to build that's then included by each build system? So we would only change the list of files in one place, similar to how the sources and IDL files are shared (with a few ifdefs here and there).
Comment 8 Jocelyn Turcotte 2013-02-01 06:09:31 PST
(In reply to comment #7)
> Hmm, I'm not sure manipulating the project files of each build system directly is the way to go (I assume that's the plan?). Have anyone investigated using a generic list of things to build that's then included by each build system? So we would only change the list of files in one place, similar to how the sources and IDL files are shared (with a few ifdefs here and there).

If other ports could agree on such a generic importable text list I think it could be easier to maintain as well.

Another way to avoid the build system to become less human readable and having to handle every edge cases of .pro files syntaxes in the tool would be to keep the easy to parse cpp/h file list between magic delimiters in the file. That can easily handle 90% of the file adds/removals, would keep the complex parts of the file easier to organize and would fit well with the webkit-file interface.
Something like:

# === BEGIN FILE LIST ===

SOURCES += \
  FileA.cpp

HEADERS += \
  FileA.h

enable?(ICONDATABASE) {
  SOURCES += \
    loader/icon/IconDatabase.cpp
}

# === END FILE LIST ===
...
weird:qmake { syntax | STATEMENT }
...
Comment 9 Anders Carlsson 2013-10-02 21:14:07 PDT
Comment on attachment 134775 [details]
patch, requires 82595

Qt has been removed, clearing review flags.