summaryrefslogtreecommitdiff
path: root/CC/pkgconfig/EXPRESSIONS
diff options
context:
space:
mode:
Diffstat (limited to 'CC/pkgconfig/EXPRESSIONS')
-rw-r--r--CC/pkgconfig/EXPRESSIONS73
1 files changed, 51 insertions, 22 deletions
diff --git a/CC/pkgconfig/EXPRESSIONS b/CC/pkgconfig/EXPRESSIONS
index 535faf6..b835b58 100644
--- a/CC/pkgconfig/EXPRESSIONS
+++ b/CC/pkgconfig/EXPRESSIONS
@@ -3,6 +3,7 @@
, "imports":
{ "default-ENV": ["./", "..", "default-ENV"]
, "default-PATH": ["./", "..", "default-PATH"]
+ , "stage": ["", "stage_singleton_field"]
}
, "expression":
{ "type": "let*"
@@ -99,40 +100,68 @@
, {"type": "join", "$1": [{"type": "var", "name": "name"}, ".ldflags"]}
]
, [ "ldflags-files"
+ , { "type": "ACTION"
+ , "inputs": {"type": "empty_map"}
+ , "cmd":
+ [ "/bin/sh"
+ , "-c"
+ , { "type": "join"
+ , "separator": " "
+ , "$1":
+ { "type": "++"
+ , "$1":
+ [ ["pkg-config"]
+ , [ { "type": "join_cmd"
+ , "$1":
+ { "type": "++"
+ , "$1":
+ [ {"type": "var", "name": "args", "default": []}
+ , ["--libs", {"type": "var", "name": "name"}]
+ ]
+ }
+ }
+ ]
+ , [">", "ldflags.raw"]
+ ]
+ }
+ }
+ ]
+ , "env": {"type": "var", "name": "ENV"}
+ , "outs": ["ldflags.raw"]
+ }
+ ]
+ , [ "add_rpath"
+ , { "type": "let*"
+ , "bindings": [["fieldname", "add_rpath"], ["location", "add_rpath"]]
+ , "body": {"type": "CALL_EXPRESSION", "name": "stage"}
+ }
+ ]
+ , [ "ldflags-files"
, { "type": "to_subdir"
, "subdir": {"type": "var", "name": "stage"}
, "$1":
{ "type": "ACTION"
- , "inputs": {"type": "empty_map"}
+ , "inputs":
+ { "type": "map_union"
+ , "$1":
+ [ {"type": "var", "name": "add_rpath"}
+ , {"type": "var", "name": "ldflags-files"}
+ ]
+ }
, "cmd":
[ "/bin/sh"
, "-c"
, { "type": "join"
, "separator": " "
, "$1":
- { "type": "++"
- , "$1":
- [ ["pkg-config"]
- , [ { "type": "join_cmd"
- , "$1":
- { "type": "++"
- , "$1":
- [ {"type": "var", "name": "args", "default": []}
- , ["--libs", {"type": "var", "name": "name"}]
- ]
- }
- }
- ]
- , [">"]
- , [ { "type": "join_cmd"
- , "$1": {"type": "var", "name": "ldflags-filename"}
- }
- ]
- ]
- }
+ [ "./add_rpath $(cat ldflags.raw)"
+ , ">"
+ , { "type": "join_cmd"
+ , "$1": {"type": "var", "name": "ldflags-filename"}
+ }
+ ]
}
]
- , "env": {"type": "var", "name": "ENV"}
, "outs": [{"type": "var", "name": "ldflags-filename"}]
}
}