summaryrefslogtreecommitdiff
path: root/rules/CC/foreign/cmake/EXPRESSIONS
diff options
context:
space:
mode:
Diffstat (limited to 'rules/CC/foreign/cmake/EXPRESSIONS')
-rw-r--r--rules/CC/foreign/cmake/EXPRESSIONS21
1 files changed, 13 insertions, 8 deletions
diff --git a/rules/CC/foreign/cmake/EXPRESSIONS b/rules/CC/foreign/cmake/EXPRESSIONS
index a36c706..b4a9147 100644
--- a/rules/CC/foreign/cmake/EXPRESSIONS
+++ b/rules/CC/foreign/cmake/EXPRESSIONS
@@ -24,6 +24,7 @@
, "BUILD_POSITION_INDEPENDENT"
, "defaults-transition"
, "expand_exec"
+ , "resolve_symlinks"
]
, "imports":
{ "artifacts": ["", "field_artifacts"]
@@ -267,11 +268,11 @@
, "export TMPDIR=\"$(pwd)/scratch\""
, "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 CMAKE=$([ -x \"${CMAKE}\" ] && realpath ${CMAKE} || echo ${CMAKE})"
+ , "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})"
+ , "export CMAKE=$([ -x \"${CMAKE}\" ] && echo $(pwd)/${CMAKE} || echo ${CMAKE})"
, { "type": "join"
, "$1":
[ "export PATH=\"$(./expand_exec TOOLCHAIN -- echo "
@@ -336,9 +337,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":