summaryrefslogtreecommitdiff
path: root/CC/foreign/shell
diff options
context:
space:
mode:
Diffstat (limited to 'CC/foreign/shell')
-rw-r--r--CC/foreign/shell/EXPRESSIONS11
-rw-r--r--CC/foreign/shell/RULES7
2 files changed, 14 insertions, 4 deletions
diff --git a/CC/foreign/shell/EXPRESSIONS b/CC/foreign/shell/EXPRESSIONS
index be6f797..3836388 100644
--- a/CC/foreign/shell/EXPRESSIONS
+++ b/CC/foreign/shell/EXPRESSIONS
@@ -19,6 +19,7 @@
, "BUILD_POSITION_INDEPENDENT"
, "TIMEOUT_SCALE"
, "expand_exec"
+ , "resolve_symlinks"
]
, "imports":
{ "artifacts": ["", "field_artifacts"]
@@ -287,9 +288,13 @@
, ["(", "set --", "cd ./work"]
, {"type": "var", "name": "cmds"}
, [")"]
- , [ "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)"
+ ]
+ }
]
}
}
diff --git a/CC/foreign/shell/RULES b/CC/foreign/shell/RULES
index ffffc26..82a7d05 100644
--- a/CC/foreign/shell/RULES
+++ b/CC/foreign/shell/RULES
@@ -10,7 +10,7 @@
, "current action directory, if needed for achieving reproducibility."
]
, "target_fields": ["project", "localbase", "deps"]
- , "string_fields": ["cmds", "outs", "out_dirs"]
+ , "string_fields": ["cmds", "outs", "out_dirs", "resolve_symlinks"]
, "config_vars":
[ "CC"
, "CXX"
@@ -42,6 +42,10 @@
[ "List of commands to execute by \"sh\". Multiple commands will be"
, "joined with the newline character."
]
+ , "resolve_symlinks":
+ [ "Resolve all symlinks in the install directory. This operation is"
+ , "performed immediately after \"cmds\" were executed."
+ ]
, "outs": ["Paths to the produced output files in \"DESTDIR\"."]
, "out_dirs": ["Paths to the produced output directories in \"DESTDIR\"."]
}
@@ -161,6 +165,7 @@
, "body": {"type": "CALL_EXPRESSION", "name": "stage_field"}
}
]
+ , ["resolve_symlinks", {"type": "FIELD", "name": "resolve_symlinks"}]
]
, "body":
{ "type": "RESULT"