summaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2018-04-11 04:27:07 (GMT)
committerGitHub <noreply@github.com>2018-04-11 04:27:07 (GMT)
commitffc638142d8bb5d70204047a7bd3bdd34b127d85 (patch)
tree317cf27c6163d608a3df30e15eecc540c7020ef4 /scripts/functions
parent7c3422675909ea8b117f94a26170af06a265477e (diff)
parentc4608f07f7e06a58d48d74b64296be663a94c604 (diff)
Merge pull request #937 from stilor/build-autotoolize
Autotoolize crosstool-ng
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions25
1 files changed, 19 insertions, 6 deletions
diff --git a/scripts/functions b/scripts/functions
index 9440f0e..0b8fba5 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -985,18 +985,18 @@ CT_GetFile()
# Two wrappers to call config.(guess|sub) either from CT_TOP_DIR or CT_LIB_DIR.
# Those from CT_TOP_DIR, if they exist, will be be more recent than those from CT_LIB_DIR.
CT_DoConfigGuess() {
- if [ -x "${CT_TOP_DIR}/scripts/config.guess" ]; then
- "${CT_TOP_DIR}/scripts/config.guess"
+ if [ -r "${CT_TOP_DIR}/scripts/config.guess" ]; then
+ "${CT_CONFIG_SHELL}" "${CT_TOP_DIR}/scripts/config.guess"
else
- "${CT_LIB_DIR}/scripts/config.guess"
+ "${CT_CONFIG_SHELL}" "${CT_LIB_DIR}/scripts/config.guess"
fi
}
CT_DoConfigSub() {
- if [ -x "${CT_TOP_DIR}/scripts/config.sub" ]; then
- "${CT_TOP_DIR}/scripts/config.sub" "$@"
+ if [ -r "${CT_TOP_DIR}/scripts/config.sub" ]; then
+ "${CT_CONFIG_SHELL}" "${CT_TOP_DIR}/scripts/config.sub" "$@"
else
- "${CT_LIB_DIR}/scripts/config.sub" "$@"
+ "${CT_CONFIG_SHELL}" "${CT_LIB_DIR}/scripts/config.sub" "$@"
fi
}
@@ -2283,3 +2283,16 @@ CT_GetChoicePkgBuildVersion()
eval "component=\${CT_${choice}_CHOICE_KSYM}"
CT_GetPkgBuildVersion "${choice}" "${component}" "${var}"
}
+
+# Finally, load paths.sh. For --enable-local build, it is located in
+# the current directory (CT_TOP_DIR) while the rest of the scripts are
+# in the source directory (CT_LIB_DIR). For other setups, paths.sh
+# is in CT_LIB_DIR.
+if [ -r "${CT_LIB_DIR}/paths.sh" ]; then
+ paths_sh_location="${CT_LIB_DIR}/paths.sh"
+elif [ -r "${CT_TOP_DIR}/paths.sh" ]; then
+ paths_sh_location="${CT_TOP_DIR}/paths.sh"
+else
+ CT_Error "Not found: paths.sh"
+fi
+. "${paths_sh_location}"