xcconfig files: line wrap and inheriting

  • Hi all,

    Two misc questions about xcconfig files:

    1) I have a line longer than the width of my monitor:

    WARNING_CFLAGS = -Wall -Wextra ....

    can I break it up?

    The C way below doesn't work:
    WARNING_CFLAGS = -Wall \
    -Wextra ....

    2) Is $(inherited) the generic way to add to a setting?  I copy and
    pasted this from the project:

    USER_HEADER_SEARCH_PATHS = $(inherited) $(my-source-tree)

    Can I use that syntax anywhere, like this:

    OTHER_CPLUSPLUSFLAGS = $(inherited) -D_GLIBCXX_DEBUG

    or must I do this:

    OTHER_CPLUSPLUSFLAGS = $(OTHER_CPLUSPLUSFLAGS) -D_GLIBCXX_DEBUG

    Thanks,

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
  • On Jul 20, 2006, at 1:15 PM, Sean McBride wrote:

    > 1) I have a line longer than the width of my monitor:
    >
    > WARNING_CFLAGS = -Wall -Wextra ....
    >
    > can I break it up?
    >
    > The C way below doesn't work:
    > WARNING_CFLAGS = -Wall \
    > -Wextra ....

    You can turn on wrapping in the editor, but no, the very, very simple
    parser for .xcconfig files doesn't support broken-up lines.

    > 2) Is $(inherited) the generic way to add to a setting?  I copy and
    > pasted this from the project:
    >
    > USER_HEADER_SEARCH_PATHS = $(inherited) $(my-source-tree)
    >
    > Can I use that syntax anywhere, like this:
    >
    > OTHER_CPLUSPLUSFLAGS = $(inherited) -D_GLIBCXX_DEBUG
    >
    > or must I do this:
    >
    > OTHER_CPLUSPLUSFLAGS = $(OTHER_CPLUSPLUSFLAGS) -D_GLIBCXX_DEBUG

    $(inherited) is equivalent to $(WHATEVER_SETTING_IS_BEING_DEFINED) in
    all cases.  It refers to "the expanded value of the setting from the
    level that this level overrides".

    Chris
  • On Jul 20, 2006, at 9:27 PM, Chris Espinosa wrote:

    > You can turn on wrapping in the editor, but no, the very, very
    > simple parser for .xcconfig files doesn't support broken-up lines.

    I have been using xcconfigs extensively in a large commercial
    project, and have been wanting backslash-style line breaks. I just
    wrote a bug about it. (#4643648)

    > $(inherited) is equivalent to $(WHATEVER_SETTING_IS_BEING_DEFINED)
    > in all cases.  It refers to "the expanded value of the setting from
    > the level that this level overrides".

    Except that $(inherited) doesn't expand to the value supplied by the
    project/target's xcconfig -- you must explicitly spell out the
    setting name in this case. Oddly, it does work if the xcconfig is
    used for the project, and you use $(inherited) in the target
    settings. I've written a bug on this one (#4643636).

    - Ladd
  • On 2006-07-20 22:20, Ladd Van Tol said:

    >> You can turn on wrapping in the editor, but no, the very, very
    >> simple parser for .xcconfig files doesn't support broken-up lines.
    >
    > I have been using xcconfigs extensively in a large commercial
    > project, and have been wanting backslash-style line breaks. I just
    > wrote a bug about it. (#4643648)

    You beat me by 388 bugs :)

    >> $(inherited) is equivalent to $(WHATEVER_SETTING_IS_BEING_DEFINED)
    >> in all cases.  It refers to "the expanded value of the setting from
    >> the level that this level overrides".
    >
    > Except that $(inherited) doesn't expand to the value supplied by the
    > project/target's xcconfig -- you must explicitly spell out the
    > setting name in this case. Oddly, it does work if the xcconfig is
    > used for the project, and you use $(inherited) in the target
    > settings. I've written a bug on this one (#4643636).

    Thanks for this warning, I guess its safest to just never use $
    (inherited) then.

    Thanks to Chris also for his reply.

    --
    ____________________________________________________________
    Sean McBride, B. Eng                <sean...>
    Rogue Research                        www.rogue-research.com
    Mac Software Developer              Montréal, Québec, Canada
previous month july 2006 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            
Go to today