summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2024-12-04 13:26:20 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2024-12-04 13:26:20 +0100
commit3fde77416fcc01f69f3498e6cf3fe70c6f41f3e2 (patch)
tree639f777720771c577f03104c0c58df3a70839d6f
parent98864a4b1844144b293452184ea579cd1bbc8938 (diff)
parent4f04c9167256c6359e1939a7199901b53b90131f (diff)
downloadrules-cc-3fde77416fcc01f69f3498e6cf3fe70c6f41f3e2.tar.gz
Merge subtree 'rules' into rules-cc
* commit '4f04c9167256c6359e1939a7199901b53b90131f': config_file: Support PATH from defaults
-rw-r--r--rules/CC/auto/RULES24
1 files changed, 22 insertions, 2 deletions
diff --git a/rules/CC/auto/RULES b/rules/CC/auto/RULES
index 6ad967f..34886d8 100644
--- a/rules/CC/auto/RULES
+++ b/rules/CC/auto/RULES
@@ -1238,8 +1238,11 @@
, "string_fields": ["magic_string", "@only", "output"]
, "target_fields": ["input"]
, "config_vars": ["defines"]
- , "imports": {"stage_singleton_field": ["", "stage_singleton_field"]}
- , "implicit": {"runner": ["runner"]}
+ , "imports":
+ { "stage_singleton_field": ["", "stage_singleton_field"]
+ , "default-PATH": ["./", "..", "default-PATH"]
+ }
+ , "implicit": {"runner": ["runner"], "defaults": [["./", "..", "defaults"]]}
, "expression":
{ "type": "let*"
, "bindings":
@@ -1314,6 +1317,22 @@
{"type": "CALL_EXPRESSION", "name": "stage_singleton_field"}
}
]
+ , ["PATH", {"type": "CALL_EXPRESSION", "name": "default-PATH"}]
+ , [ "ENV"
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "PATH"}
+ , "then":
+ { "type": "singleton_map"
+ , "key": "PATH"
+ , "value":
+ { "type": "join"
+ , "separator": ":"
+ , "$1": {"type": "var", "name": "PATH"}
+ }
+ }
+ , "else": {"type": "empty_map"}
+ }
+ ]
, [ "outfile"
, { "type": "ACTION"
, "inputs":
@@ -1331,6 +1350,7 @@
, {"type": "var", "name": "magic_string"}
, {"type": "var", "name": "@only"}
]
+ , "env": {"type": "var", "name": "ENV"}
, "outs": ["out"]
}
]