Bug 83001 - Introduce another file-to-array script
Summary: Introduce another file-to-array script
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kent Tamura
URL:
Keywords:
Depends on:
Blocks: 53961 83011
  Show dependency treegraph
 
Reported: 2012-04-02 23:33 PDT by Kent Tamura
Modified: 2012-04-03 02:33 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.25 KB, patch)
2012-04-02 23:43 PDT, Kent Tamura
haraken: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Tamura 2012-04-02 23:33:53 PDT
Introduce another file-to-array script
Comment 1 Kent Tamura 2012-04-02 23:43:48 PDT
Created attachment 135280 [details]
Patch
Comment 2 Kent Tamura 2012-04-02 23:45:00 PDT
This will be used in Bug 53961.  A WIP patch in Bug 53961 demonstrates how to use this.
Comment 3 Kentaro Hara 2012-04-02 23:59:38 PDT
Comment on attachment 135280 [details]
Patch 

View in context: https://bugs.webkit.org/attachment.cgi?id=135280&action=review

> Source/WebCore/ChangeLog:12
> +        - No whitespace stripping for CSS files

Maybe we want to support an option to strip whitespaces in make-file-arrays.py, and then remove make-css-file-arrays.pl (in another patch).

> Source/WebCore/make-file-arrays.py:30
> +# Usage: make-file-arrays.py [--condition=condition-string] --out-h=<header-file-name> --out-cpp=<cpp-file-name> <input-file>...

Nit: [--condition=conditional-flag-name] might be descriptive.

> Source/WebCore/make-file-arrays.py:39
> +    result = re.match(r"(\w+)\.(\w+)", os.path.basename(file_name))

r"([\w\d_]+)\.([\w\d_]+))" might be better?
Comment 4 Kent Tamura 2012-04-03 00:03:43 PDT
(In reply to comment #3)
> (From update of attachment 135280 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135280&action=review
> 
> > Source/WebCore/ChangeLog:12
> > +        - No whitespace stripping for CSS files
> 
> Maybe we want to support an option to strip whitespaces in make-file-arrays.py, and then remove make-css-file-arrays.pl (in another patch).

Yes.  I'd like to integrate make-css-file-arrays.pl and xxd.pl into this in the future.

> > Source/WebCore/make-file-arrays.py:30
> > +# Usage: make-file-arrays.py [--condition=condition-string] --out-h=<header-file-name> --out-cpp=<cpp-file-name> <input-file>...
> 
> Nit: [--condition=conditional-flag-name] might be descriptive.

We can specify this flag like --condition="ENABLE(CALENDAR_PICKER) && ENABLE(PAGE_POPUP)".  So, this isn't a name.

> > Source/WebCore/make-file-arrays.py:39
> > +    result = re.match(r"(\w+)\.(\w+)", os.path.basename(file_name))
> 
> r"([\w\d_]+)\.([\w\d_]+))" might be better?

Looks nice.  I'll apply it.
Comment 5 Kent Tamura 2012-04-03 00:15:11 PDT
Committed r112988: <http://trac.webkit.org/changeset/112988>