summaryrefslogtreecommitdiff
path: root/rules/CC/auto/RULES
diff options
context:
space:
mode:
Diffstat (limited to 'rules/CC/auto/RULES')
-rw-r--r--rules/CC/auto/RULES31
1 files changed, 31 insertions, 0 deletions
diff --git a/rules/CC/auto/RULES b/rules/CC/auto/RULES
index 247ee016..0e156c98 100644
--- a/rules/CC/auto/RULES
+++ b/rules/CC/auto/RULES
@@ -156,6 +156,7 @@
, "flags-cc": ["./", "..", "flags-cc"]
, "flags-cxx": ["./", "..", "flags-cxx"]
, "default-ENV": ["./", "..", "default-ENV"]
+ , "default-PATH": ["./", "..", "default-PATH"]
, "default-TOOLCHAIN": ["./", "..", "default-TOOLCHAIN"]
, "default-NON_SYSTEM_TOOLS": ["./", "..", "default-NON_SYSTEM_TOOLS"]
}
@@ -222,6 +223,36 @@
]
}
]
+ , [ "ENV_PATH"
+ , { "type": "lookup"
+ , "map": {"type": "var", "name": "ENV"}
+ , "key": "PATH"
+ }
+ ]
+ , [ "ENV"
+ , { "type": "map_union"
+ , "$1":
+ [ {"type": "var", "name": "ENV"}
+ , { "type": "singleton_map"
+ , "key": "PATH"
+ , "value":
+ { "type": "join"
+ , "separator": ":"
+ , "$1":
+ { "type": "++"
+ , "$1":
+ [ {"type": "CALL_EXPRESSION", "name": "default-PATH"}
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "ENV_PATH"}
+ , "then": [{"type": "var", "name": "ENV_PATH"}]
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ ]
, [ "c.flags"
, { "type": "BLOB"
, "data":