This allows options set as defines to the compiler to be used as targets
for substitution using the syntax ${DEFINES:define_target}. These need
special handling since they are not in a form that is trivially consumed
by the mapping code.
---
 wscript | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/wscript b/wscript
index 4d63dbc66f..9de9d67b91 100755
--- a/wscript
+++ b/wscript
@@ -107,6 +107,10 @@ class EnvWrapper(object):
         except IndexError:
             fmt = "{}"
         if isinstance(v, list):
+            if fields[0] == "DEFINES":
+                for D in v:
+                    if D.startswith(fields[1]+'='):
+                        return "{}".format(D.split("=")[1].strip('"'))
             return " ".join([fmt.format(w) for w in v])
         return fmt.format(v)
 
-- 
2.30.2

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to