diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-07-01 19:04:20 +0000 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-07-01 19:04:20 +0000 |
commit | 26713d42100ebb0f949777060102b8fa20c22ffd (patch) | |
tree | c19e1e5ca3405de45e3465487ec1617fd579b532 /scripts/functions | |
parent | c2abd16d69e6fb9514c91d81d25aa56a0633723c (diff) | |
download | crosstool-ng-26713d42100ebb0f949777060102b8fa20c22ffd.tar.gz crosstool-ng-26713d42100ebb0f949777060102b8fa20c22ffd.tar.bz2 crosstool-ng-26713d42100ebb0f949777060102b8fa20c22ffd.zip |
Merge the build system to trunk: ct-ng is now installable:
- ./configure --prefix=/some/place
- make
- make install
- export PATH="${PATH}:/some/place/bin"
- ct-ng <action>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/scripts/functions b/scripts/functions index d66fe22e..18ee9695 100644 --- a/scripts/functions +++ b/scripts/functions @@ -425,7 +425,9 @@ CT_ExtractAndPatch() { cd "${file}" fi - [ "${CUSTOM_PATCH_ONLY}" = "y" ] || official_patch_dir="${CT_TOP_DIR}/patches/${base_file}/${ver_file}" + official_patch_dir= + custom_patch_dir= + [ "${CUSTOM_PATCH_ONLY}" = "y" ] || official_patch_dir="${CT_LIB_DIR}/patches/${base_file}/${ver_file}" [ "${CT_CUSTOM_PATCH}" = "y" ] && custom_patch_dir="${CT_CUSTOM_PATCH_DIR}/${base_file}/${ver_file}" for patch_dir in "${official_patch_dir}" "${custom_patch_dir}"; do if [ -n "${patch_dir}" -a -d "${patch_dir}" ]; then @@ -442,6 +444,24 @@ CT_ExtractAndPatch() { CT_Popd } +# 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}/tools/config.guess" ]; then + "${CT_TOP_DIR}/tools/config.guess" + else + "${CT_LIB_DIR}/tools/config.guess" + fi +} + +CT_DoConfigSub() { + if [ -x "${CT_TOP_DIR}/tools/config.sub" ]; then + "${CT_TOP_DIR}/tools/config.sub" "$@" + else + "${CT_LIB_DIR}/tools/config.sub" "$@" + fi +} + # Compute the target triplet from what is provided by the user # Usage: CT_DoBuildTargetTriplet # In fact this function takes the environment variables to build the target @@ -482,7 +502,7 @@ CT_DoBuildTargetTriplet() { glibc) CT_TARGET="${CT_TARGET}-gnu";; uClibc) CT_TARGET="${CT_TARGET}-uclibc";; esac - CT_TARGET="`${CT_TOP_DIR}/tools/config.sub ${CT_TARGET}`" + CT_TARGET=`CT_DoConfigSub "${CT_TARGET}"` } # This function does pause the build until the user strikes "Return" |