diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-06-30 11:44:03 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-07-10 11:26:29 +0200 |
commit | f95b6da8d562283a988747049d83d3f4156dce3a (patch) | |
tree | 1f7b3df27c50ce1bfb8286ea96493b86db29ad73 | |
parent | 9aab2a4d365128579df85285555d1996f194eea4 (diff) | |
download | rules-cc-f95b6da8d562283a988747049d83d3f4156dce3a.tar.gz |
make: Support staging of deps to localbase
-rw-r--r-- | CC/foreign/make/EXPRESSIONS | 5 | ||||
-rw-r--r-- | CC/foreign/make/RULES | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/CC/foreign/make/EXPRESSIONS b/CC/foreign/make/EXPRESSIONS index 7d733a6..e4db90c 100644 --- a/CC/foreign/make/EXPRESSIONS +++ b/CC/foreign/make/EXPRESSIONS @@ -2,6 +2,7 @@ { "vars": [ "source_dir" , "subdir" + , "localbase_dir" , "configure" , "configure_options" , "make_targets" @@ -325,6 +326,10 @@ , "$1": [ {"type": "var", "name": "TOOLCHAIN"} , {"type": "var", "name": "source_dir"} + , { "type": "var" + , "name": "localbase_dir" + , "default": {"type": "empty_map"} + } , {"type": "var", "name": "script"} ] } diff --git a/CC/foreign/make/RULES b/CC/foreign/make/RULES index 992ec2a..2ea74b2 100644 --- a/CC/foreign/make/RULES +++ b/CC/foreign/make/RULES @@ -506,6 +506,7 @@ , "make-build": "make-build" , "strip-prefix": ["./", "..", "strip-prefix"] , "prebuilt result": ["CC/prebuilt", "prebuilt result"] + , "install-deps": ["CC", "install-with-deps stage"] } , "expression": { "type": "let*" @@ -564,6 +565,20 @@ , "body": {"type": "CALL_EXPRESSION", "name": "stage_field"} } ] + , [ "localbase_dir" + , { "type": "to_subdir" + , "subdir": "localbase" + , "msg": "dependency installation files may not overlap" + , "$1": + { "type": "let*" + , "bindings": + [ ["pc-install-dir", "lib/pkgconfig"] + , ["targets", {"type": "FIELD", "name": "deps"}] + ] + , "body": {"type": "CALL_EXPRESSION", "name": "install-deps"} + } + } + ] , [ "installed_dirs" , { "type": "foreach" , "var": "dir_path" |