diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-01-16 19:10:32 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-01-20 16:02:11 +0100 |
commit | 4a8579a2a4ef252644df0c29893e70ad8438ae82 (patch) | |
tree | fa53e5d398c6dba59ed760fb3d802cc059f05821 /CC/RULES | |
parent | d567b848e57686f631b0a0c081126bea578838c2 (diff) | |
download | rules-cc-4a8579a2a4ef252644df0c29893e70ad8438ae82.tar.gz |
Support flag-files for existing rules and expressions
Diffstat (limited to 'CC/RULES')
-rw-r--r-- | CC/RULES | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -624,7 +624,8 @@ , "expression": { "type": "let*" , "bindings": - [ [ "install-stage" + [ ["pc-install-dir", "share/pkgconfig"] + , [ "install-stage" , { "type": "disjoint_map_union" , "msg": "install stages may not overlap" , "$1": @@ -770,11 +771,32 @@ ] } ] + , [ "pkg-flag-files" + , { "type": "map_union" + , "$1": + [ { "type": "lookup" + , "key": "cflags-files" + , "map": {"type": "var", "name": "package"} + , "default": {"type": "empty_map"} + } + , { "type": "lookup" + , "key": "ldflags-files" + , "map": {"type": "var", "name": "package"} + , "default": {"type": "empty_map"} + } + ] + } + ] , ["pkg-libs", {"type": "var", "name": "libraries"}] , ["flat-libs", {"type": "FIELD", "name": "flat-libs"}] ] , "body": - {"type": "CALL_EXPRESSION", "name": "pkg-config"} + { "type": "map_union" + , "$1": + [ {"type": "CALL_EXPRESSION", "name": "pkg-config"} + , {"type": "var", "name": "pkg-flag-files"} + ] + } } , "else": {"type": "empty_map"} } @@ -800,7 +822,7 @@ , "$1": {"type": "var", "name": "libraries"} } , { "type": "to_subdir" - , "subdir": "share/pkgconfig" + , "subdir": {"type": "var", "name": "pc-install-dir"} , "$1": {"type": "var", "name": "pkg-config"} } ] |