summaryrefslogtreecommitdiff
path: root/CC/foreign/make
diff options
context:
space:
mode:
Diffstat (limited to 'CC/foreign/make')
-rw-r--r--CC/foreign/make/EXPRESSIONS11
-rw-r--r--CC/foreign/make/RULES12
2 files changed, 20 insertions, 3 deletions
diff --git a/CC/foreign/make/EXPRESSIONS b/CC/foreign/make/EXPRESSIONS
index 6a213a7..b03e056 100644
--- a/CC/foreign/make/EXPRESSIONS
+++ b/CC/foreign/make/EXPRESSIONS
@@ -26,6 +26,7 @@
, "TIMEOUT_SCALE"
, "defaults-transition"
, "expand_exec"
+ , "resolve_symlinks"
]
, "imports":
{ "artifacts": ["", "field_artifacts"]
@@ -304,9 +305,13 @@
]
}
}
- , [ "mv install install_with_symlinks"
- , "cp -rL install_with_symlinks install"
- ]
+ , { "type": "if"
+ , "cond": {"type": "var", "name": "resolve_symlinks"}
+ , "then":
+ [ "mv install install_with_symlinks"
+ , "cp -rL install_with_symlinks install >copy.log 2>&1 || (echo 'ERROR: symlink resolve failed with:' && cat copy.log && exit 1)"
+ ]
+ }
, { "type": "if"
, "cond": {"type": "var", "name": "post_cmds"}
, "then":
diff --git a/CC/foreign/make/RULES b/CC/foreign/make/RULES
index 76fca18..e3c28db 100644
--- a/CC/foreign/make/RULES
+++ b/CC/foreign/make/RULES
@@ -20,6 +20,7 @@
, "post_cmds"
, "out_files"
, "out_dirs"
+ , "resolve_symlinks"
]
, "config_vars":
[ "ARCH"
@@ -89,6 +90,10 @@
, "\"post_cmds\" can be exchanged via \"$TMPDIR\", which is uniquely"
, "reserved for this action."
]
+ , "resolve_symlinks":
+ [ "Resolve all symlinks in the install directory. This operation is"
+ , "performed immediately after the install, before \"post_cmds\" are run."
+ ]
, "out_files":
[ "Paths to the produced output files. The paths are considered relative"
, "to the install directory."
@@ -222,6 +227,7 @@
, ["make_jobs", {"type": "FIELD", "name": "jobs"}]
, ["pre_cmds", {"type": "FIELD", "name": "pre_cmds"}]
, ["post_cmds", {"type": "FIELD", "name": "post_cmds"}]
+ , ["resolve_symlinks", {"type": "FIELD", "name": "resolve_symlinks"}]
, ["defaults-transition", {"type": "empty_map"}]
, [ "expand_exec"
, { "type": "let*"
@@ -310,6 +316,7 @@
, "hdr_prefix"
, "lib_prefix"
, "pc_prefix"
+ , "resolve_symlinks"
]
, "config_vars":
[ "ARCH"
@@ -383,6 +390,10 @@
, "that data between \"pre_cmds\" and \"post_cmds\" can be exchanged via"
, "\"$TMPDIR\", which is uniquely reserved for this action."
]
+ , "resolve_symlinks":
+ [ "Resolve all symlinks in the install directory. This operation is"
+ , "performed immediately after the install, before \"post_cmds\" are run."
+ ]
, "out_hdrs":
[ "Paths to produced public header files. The path is considered"
, "relative to the include directory, which be set via \"hdr_prefix\"."
@@ -640,6 +651,7 @@
, ["make_jobs", {"type": "FIELD", "name": "jobs"}]
, ["pre_cmds", {"type": "FIELD", "name": "pre_cmds"}]
, ["post_cmds", {"type": "FIELD", "name": "post_cmds"}]
+ , ["resolve_symlinks", {"type": "FIELD", "name": "resolve_symlinks"}]
, ["defaults-transition", {"type": "empty_map"}]
, [ "expand_exec"
, { "type": "let*"