diff --git a/config/ompi_get_version.sh b/config/ompi_get_version.sh index 865b7ee054..e2ca5f7341 100755 --- a/config/ompi_get_version.sh +++ b/config/ompi_get_version.sh @@ -26,6 +26,16 @@ srcfile="$1" option="$2" +case "$option" in + # svnversion can take a while to run. If we don't need it, don't run it. + --major|--minor|--release|--alpha|--beta|--base|--help) + OMPI_NEED_SVN=0 + ;; + *) + OMPI_NEED_SVN=1 +esac + + if test "$srcfile" = ""; then option="--help" else @@ -50,7 +60,7 @@ else OMPI_BASE_VERSION="$OMPI_VERSION" - if test "$OMPI_WANT_SVN" = "1"; then + if test "$OMPI_WANT_SVN" = "1" -a "$OMPI_NEED_SVN" = "1" ; then if test "$OMPI_SVN_R" = "-1"; then if test -d .svn; then ver="r`svnversion .`" @@ -112,6 +122,10 @@ $0 [