diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-06-11 21:45:57 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2008-06-11 21:45:57 (GMT) |
commit | 62df5c3fed96af085f08bdebd058f535e824af23 (patch) | |
tree | b5f81f1888c154d19f242216dc8df021e42f6a52 /configure | |
parent | b35770100ea8ecccc89d94ba8de6b0086456a1be (diff) |
Include the full version number in the directory paths installed.
Change the version string so that it does not break 'make', and so that it has no '/' (it would be a hell if installed directories would mirror the SVN branches... :-/ )
Do not use implicit rules for the Makefile.
Simplify and enc=hance the --local test to refuse (un)installing.
Double-quotes variables, they are based on user input.
Eye-candy in the 'compile' and install messages.
/trunk/configure | 26 14 12 0 ++++++++++---------
/trunk/Makefile.in | 83 45 38 0 +++++++++++++++++++++++++++++++++---------------------------
2 files changed, 59 insertions(+), 50 deletions(-)
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 26 |
1 files changed, 14 insertions, 12 deletions
@@ -113,11 +113,6 @@ if [ "${LOCAL_set}" = "1" ]; then set_mandir "" $(pwd)/docs fi -[ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin" -[ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}" -[ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}" -[ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1" - #--------------------------------------------------------------------- # Some sanity checks, now @@ -129,17 +124,24 @@ case "${VERSION}" in REVISION=$(LC_ALL=C svnversion) case "${REVISION}" in exported) - VERSION="${VERSION}:unknown@$(date +%Y%m%d.%H%M%S)";; + VERSION="${VERSION}unknown@$(date +%Y%m%d.%H%M%S)";; *) URL=$(LC_ALL=C svn info 2>/dev/null |egrep 'URL: ' |cut -d ' ' -f 2-) ROOT=$(LC_ALL=C svn info 2>/dev/null |egrep 'Repository Root: ' |cut -d ' ' -f 3-) - VERSION="${VERSION}:${URL#${ROOT}}@${REVISION}" + VERSION="${VERSION}${URL#${ROOT}}@${REVISION}" ;; esac + VERSION="${VERSION/\//_}" ;; esac echo "${VERSION}" +# Now we have the version string, we can buyild up the paths +[ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin" +[ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}" +[ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}" +[ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1" + # Check bash is present, and at least version 3.0 echo -n "Checking bash is at least bash-3.0... " [ -x /bin/bash ] || do_error "bash 3.0 or above was not found in /bin/bash" @@ -161,9 +163,9 @@ echo "ok" cat <<__EOF__ crosstool-NG configured as follows: - PREFIX="${PREFIX}" - BINDIR="${BINDIR}" - LIBDIR="${LIBDIR}" - DOCDIR="${DOCDIR}" - MANDIR="${MANDIR}" + PREFIX='${PREFIX}' + BINDIR='${BINDIR}' + LIBDIR='${LIBDIR}' + DOCDIR='${DOCDIR}' + MANDIR='${MANDIR}' __EOF__ |