From 62df5c3fed96af085f08bdebd058f535e824af23 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Wed, 11 Jun 2008 21:45:57 +0000 Subject: 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(-) --- configure | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 621d0c11..2d48ad8f 100755 --- a/configure +++ b/configure @@ -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__ -- cgit v1.2.3