Skip to content

Commit

Permalink
Tweak CPPDEFINES quoting note a bit more [skip appveyor]
Browse files Browse the repository at this point in the history
Signed-off-by: Mats Wichmann <mats@linux.com>
  • Loading branch information
mwichmann committed Oct 26, 2022
1 parent 418f3ea commit 6695692
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions SCons/Defaults.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ the values of the
&cv-CPPDEFPREFIX; and &cv-CPPDEFSUFFIX; &consvars;
are respectively prepended and appended to
each element in the list.
If any element is a list or tuple,
then the first item is the macro name
If any element is a tuple (or list)
then the first item of the tuple is the macro name
and the second item is the definition.
If the definition is not omitted,
these are combined into a
Expand Down Expand Up @@ -162,19 +162,21 @@ env = Environment(CPPDEFINES={'B':2, 'A':None})

<para>
Depending on how contents are added to &cv-CPPDEFINES;,
it may end up as a compound type,
it may be transformed into a compound type,
for example a list containing strings, tuples and/or dictionaries.
&SCons; expands this correctly.
&SCons; can correctly expand such a compount type.
</para>

<para>
Note that &SCons; may call the compiler via a shell.
If a macro definition contains characters such as spaces that
have meaning to the shell, you may need to use the shell's
quoting syntax to avoid interpretation before the
preprocessor sees it. In particular, function-like macros
may be supported (see the documentation for the compiler in question),
but parentheses frequently have meaning to shells.
quoting syntax to avoid interpretation before the preprocessor sees it.
Function-like macros may be supported,
depending on the compiler (see the respective documentation),
in which case the <emphasis>name</emphasis>
may also have quoting considerations,
as parentheses frequently have meaning to shells.
</para>
</summary>
</cvar>
Expand Down

0 comments on commit 6695692

Please sign in to comment.