summaryrefslogtreecommitdiff
path: root/rules/CC/foreign/make/EXPRESSIONS
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-11-20 16:03:21 +0100
committerOliver Reiche <oliver.reiche@huawei.com>2023-11-20 16:03:21 +0100
commit65e841f4cb062c77fc6cb14e7283cb0c7a1f0bb8 (patch)
treee7d9a912c304c030ad48637a82f2f513a83c1150 /rules/CC/foreign/make/EXPRESSIONS
parentb4dccdd9e27bb570e1d411f8238e4ed0c89e8e1b (diff)
parent96f7a9f47ee4dafccced87e44f98afa3f14a3df9 (diff)
downloadrules-cc-65e841f4cb062c77fc6cb14e7283cb0c7a1f0bb8.tar.gz
Merge subtree 'rules' into rules-cc
Diffstat (limited to 'rules/CC/foreign/make/EXPRESSIONS')
-rw-r--r--rules/CC/foreign/make/EXPRESSIONS19
1 files changed, 12 insertions, 7 deletions
diff --git a/rules/CC/foreign/make/EXPRESSIONS b/rules/CC/foreign/make/EXPRESSIONS
index d31a2bb..b03e056 100644
--- a/rules/CC/foreign/make/EXPRESSIONS
+++ b/rules/CC/foreign/make/EXPRESSIONS
@@ -26,6 +26,7 @@
, "TIMEOUT_SCALE"
, "defaults-transition"
, "expand_exec"
+ , "resolve_symlinks"
]
, "imports":
{ "artifacts": ["", "field_artifacts"]
@@ -245,10 +246,10 @@
, "export DESTDIR=\"$(pwd)/install\""
, "export TOOLCHAIN=\"$(pwd)/toolchain\""
, "export LOCALBASE=\"$(pwd)/localbase\""
- , "export CC=$([ -x \"${CC}\" ] && realpath ${CC} || echo ${CC})"
- , "export CXX=$([ -x \"${CXX}\" ] && realpath ${CXX} || echo ${CXX})"
- , "export AR=$([ -x \"${AR}\" ] && realpath ${AR} || echo ${AR})"
- , "export MAKE=$([ -x \"${MAKE}\" ] && realpath ${MAKE} || echo ${MAKE})"
+ , "export CC=$([ -x \"${CC}\" ] && echo $(pwd)/${CC} || echo ${CC})"
+ , "export CXX=$([ -x \"${CXX}\" ] && echo $(pwd)/${CXX} || echo ${CXX})"
+ , "export AR=$([ -x \"${AR}\" ] && echo $(pwd)/${AR} || echo ${AR})"
+ , "export MAKE=$([ -x \"${MAKE}\" ] && echo $(pwd)/${MAKE} || echo ${MAKE})"
, { "type": "join"
, "$1":
[ "export PATH=\"$(./expand_exec TOOLCHAIN -- echo "
@@ -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":