summaryrefslogtreecommitdiff
path: root/rules/CC/foreign/make/EXPRESSIONS
diff options
context:
space:
mode:
Diffstat (limited to 'rules/CC/foreign/make/EXPRESSIONS')
-rw-r--r--rules/CC/foreign/make/EXPRESSIONS40
1 files changed, 36 insertions, 4 deletions
diff --git a/rules/CC/foreign/make/EXPRESSIONS b/rules/CC/foreign/make/EXPRESSIONS
index 5f80fd8..bff8205 100644
--- a/rules/CC/foreign/make/EXPRESSIONS
+++ b/rules/CC/foreign/make/EXPRESSIONS
@@ -288,10 +288,42 @@
, "export DESTDIR=\"$(pwd)/install\""
, "export TOOLCHAIN=\"$(pwd)/toolchain\""
, "export LOCALBASE=\"$(pwd)/localbase\""
- , "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": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "CC"
+ , "map": {"type": "var", "name": "NON_SYSTEM_TOOLS"}
+ }
+ , "then": "export CC=$(pwd)/${CC}"
+ , "else": ""
+ }
+ , { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "CXX"
+ , "map": {"type": "var", "name": "NON_SYSTEM_TOOLS"}
+ }
+ , "then": "export CXX=$(pwd)/${CXX}"
+ , "else": ""
+ }
+ , { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "AR"
+ , "map": {"type": "var", "name": "NON_SYSTEM_TOOLS"}
+ }
+ , "then": "export AR=$(pwd)/${AR}"
+ , "else": ""
+ }
+ , { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "MAKE"
+ , "map": {"type": "var", "name": "NON_SYSTEM_TOOLS"}
+ }
+ , "then": "export MAKE=$(pwd)/${MAKE}"
+ , "else": ""
+ }
, { "type": "join"
, "$1":
[ "export PATH=\"$(./expand_exec TOOLCHAIN -- echo "