[webkit-dev] Better syntax for GYP (Was Common build system; was Re: WebKit Wishes)

Maciej Stachowiak mjs at apple.com
Tue Feb 5 15:38:52 PST 2013

On Feb 5, 2013, at 2:01 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> Using a YAML-like syntax, we can rewrite it as:
> XMLName:
>     inputs:
>         <(SHARED_INTERMEDIATE_DIR)/../dom/make_names.pl
>         <(SHARED_INTERMEDIATE_DIR)/../xml/xmlattrs.in
>     outputs:
>         XMLNames.cpp
>         XMLNames.h
>     action:
>         python scripts/action_makenames.py <@(_outputs) -- <@(_inputs) -- --extraDefines <(feature_defines)
>     msvs_cygwin_shell: True
> To me, this YAML-like syntax reads significantly better.

It does seem like an improvement. Maybe inputs and outputs could also be space-separated instead of newline separated, like the action. That would still have a bit more overhead than make syntax, but at least it would be meaningful labels, rather than punctuation and newlines.

> Now, I don't like all the magic strings like "<(SHARED_INTERMEDIATE_DIR)/../" and  "<@(_outputs) -- <@(_inputs) -- --extraDefines <(feature_defines)". Can someone with build system knowlede prettify them?

It's necessary to have some kind of syntax for variable expansion in the action command, and it likely can't be too verbose. Though something involving the $ character might look more obviously like a variable expansion.

 - Maciej

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20130205/ecdfbde5/attachment.html>

More information about the webkit-dev mailing list